-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall
32 lines (27 loc) · 813 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo -e "\033[38;5;213mAttempting to install antikobpae's dependencies ($#)...\033[39m"
mkdir $(pwd)/src
cd $(pwd)/src
args=("$@")
deps=(essentials git python chardet mysql rvm openssl iconv ruby sphinx swath wicked-pdf imagemagick libreoffice)
#deps=("$(ls lib/install)")
NB=$#
Z=0
if [ $NB -gt $Z ];
then
echo -e "\033[38;5;213mPackages : $@\033[39m"
for (( i=0;i<${#args[@]};i++)); do
if [ -e ../lib/install/${args[${i}]} ];
then bash ../lib/install/${args[${i}]} ;
else echo -e "\033[38;5;1m=> '$arg' doesn't exist\033[39m"
fi
done
else
echo -e "\033[38;5;213mPackages : ${deps[@]}\033[39m"
for (( i=0;i<${#deps[@]};i++)); do
bash ../lib/install/${deps[${i}]};
done
fi
echo -e "\033[38;5;213mCleaning...\033[39m"
cd $(pwd)
rm -rf src/