-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·36 lines (31 loc) · 857 Bytes
/
install.sh
File metadata and controls
executable file
·36 lines (31 loc) · 857 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
#!/bin/sh
# Link config files from current directory, excluding unnecessary files.
if [ $# -lt 1 ] && [ -e ~/.bashrc.local ]; then
echo "Looks like everything is already set up!"
exit 0
fi
git submodule update --init
mv ~/.bashrc ~/.bashrc.old
for f in `find . -maxdepth 1 \
\! \( \
-path '*.' \
-o -path '*.config' \
-o -path '*.git' \
-o -path '*.gitignore' \
-o -path '*install.sh*' \
\)`; do
ln -s $PWD/`echo $f | cut -c3-` ~
done
# Do .config/ separately to allow local configuration.
mkdir -p ~/.config/
for f in `find .config/* -maxdepth 0`; do
ln -s $PWD/$f ~/.config
done
# Create .bashrc.local as a signal that we've already run this script
for file in \
~/.bashrc.local \
~/.tmux.conf.local \
~/.vimrc.local \
; do
touch $file;
done