bootstrap.sh - dotfiles - These are my dotfiles. There are many like it, but these are mine.
(HTM) git clone git://jay.scot/dotfiles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
bootstrap.sh (643B)
---
1 #!/bin/sh
2
3 DOTFILES=$(pwd)
4
5 FILES='ashrc profile'
6 ROOT='bin'
7 CONFIG='fdm foot git lynx mutt nvim sfeed sway waybar'
8
9 link() {
10 for f in $FILES; do ln -sfn "$DOTFILES/$f" "$HOME/.$f"; done
11 for f in $ROOT; do ln -sfn "$DOTFILES/$f" "$HOME/$f"; done
12 for f in $CONFIG; do ln -sfn "$DOTFILES/$f" "$HOME/.config/$f"; done
13 }
14
15 unlink() {
16 for f in $FILES; do unlink "$HOME/.$f"; done
17 for f in $ROOT; do unlink "$HOME/$f"; done
18 for f in $CONFIG; do unlink "$HOME/.config/$f"; done
19 }
20
21 testsh() {
22 shellcheck -s sh "$DOTFILES"/bin/*.sh
23 shfmt -p -w "$DOTFILES"/bin/*.sh
24 }
25
26 if [ "$#" -eq 0 ]; then
27 printf "No arguments supplied\n" >&2
28 exit 1
29 fi
30
31 $1