-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·37 lines (31 loc) · 783 Bytes
/
setup.sh
File metadata and controls
executable file
·37 lines (31 loc) · 783 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
#!/usr/bin/env bash
# Start from dotfiles directory
DOTFILES_SRC=$(pwd)
LOCAL_DOTFILES=${DOTFILES_SRC}/local_dotfiles
RC_FILES=".*rc
.vim"
NOP=''
NOP='echo'
if ${NOP}
then
echo "To actually run this file, comment out NOP='echo'."
fi
${NOP}
echo "Making local dotfile husks in ${LOCAL_DOTFILES}."
${NOP} mkdir -p ${LOCAL_DOTFILES}
for FILE in ${RC_FILES}
do
${NOP}
echo "Touching local dotfile in ${LOCAL_DOTFILES}/${FILE}."
${NOP} touch ${LOCAL_DOTFILES}/${FILE}
done
${NOP}
echo "Linking local dotfile directory (${LOCAL_DOTFILES}) in ~/.local."
${NOP} cd ~/.local
${NOP} ln -s ${LOCAL_DOTFILES} dotfiles
${NOP}
echo "Linking general dotfiles into ~"
${NOP} cd ~
for FILE in ${RC_FILES}
do ${NOP} ln -s ${DOTFILES_SRC}/${FILE}
done