-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (30 loc) · 856 Bytes
/
install.sh
File metadata and controls
executable file
·38 lines (30 loc) · 856 Bytes
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
#!/bin/sh
set -e
BASE="$(cd "$(dirname "$0")" && pwd)"
# Very simple install script
for file in `find ${BASE} -maxdepth 1 -type f -not -name '.*' -not -name install.sh -not -name bin -not -name etc -not -name README.txt -not -name LICENSE`; do
filename=`basename "$file"`
from="$BASE/$filename"
to="$HOME/.$filename"
echo "ln -sf $from -> $to"
ln -sf $from $to
done
# Link directories
for dir in bash vim; do
from="$BASE/$dir"
to="$HOME/.$dir"
echo "ln -sf $from -> $to"
ln -sf $from $to
done
mkdir -p ~/bin/
for file in "$BASE"/bin/*; do
filename=`basename "$file"`
from="$BASE/bin/$filename"
to="$HOME/bin/$filename"
echo "ln -sf $from -> $to"
ln -sf $from $to
done
# Special case: Make bin/git-reup a link to git-up
if [[ -e ~/bin/git-up ]]; then
ln -sf ~/bin/git-up ~/bin/git-reup
fi