-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·53 lines (39 loc) · 978 Bytes
/
install.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
# if you use this function,
# you have to goto directory where it is.
symlink(){
echo $@
for file in $@
do
if [! -e $HOME/$file ]; then
ln -s $(pwd)/$file $HOME/$file
# echo 'linked'
else
rm $HOME/$file
ln -s $(pwd)/$file $HOME/$file
# echo 'rm and linked'
fi
echo '[*] '$file' linked succeeded'
done
}
export PLATFORM=$(uname)
log(){
echo "-> " $1
}
if [ $PLATFORM = "Darwin" ]; then
echo ''
fi
if [ $PLATFORM = "Linux" ]; then
# for linux environments
cd ./src/
echo 'cd ./src/'
echo 'make symlinks of dotfiles...'
symlink $(ls -aF | cut -f 1 | grep -v / | awk -F\n -v ORS=' ' '{print}' )
symlink .emacs.d
echo 'cd ../'
cd ../
echo '[*] pip installing...'
pip install -r requirements.lubuntu
echo '[*] package installing...'
cat packagelist | xargs apt-get install
fi