Overview
Comment: | setup.sh: Clean up a little |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
bfbe9e5b51a3dc433b99cc92bfd0caf2 |
User & Date: | js 2020-08-30 12:03:32 |
Context
2020-08-30
| ||
18:25 | zshrc: Clean up a little check-in: 3041a12b6a user: js tags: trunk | |
12:03 | setup.sh: Clean up a little check-in: bfbe9e5b51 user: js tags: trunk | |
11:57 | Set global fossil settings in setup.sh check-in: 2a1cebbbad user: js tags: trunk | |
Changes
Changes to setup.sh.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/bin/sh rel_dir="${PWD#$HOME/}" echo "Configs relative to home in $rel_dir." link_file() { if [ ! -e "$HOME/$2" ]; then echo "Symlinking $HOME/$2 -> $3$rel_dir/$1…" ln -s "$3$rel_dir/$1" "$HOME/$2" else echo "$HOME/$2 already exists, skipping…" fi } mkdir -p $HOME/.config | > > > > | | | | | | | | | | | | | 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 53 54 55 56 57 58 59 | #!/bin/sh rel_dir="${PWD#$HOME/}" echo "Configs relative to home in $rel_dir." have() { which $1 >/dev/null 2>&1 } link_file() { if [ ! -e "$HOME/$2" ]; then echo "Symlinking $HOME/$2 -> $3$rel_dir/$1…" ln -s "$3$rel_dir/$1" "$HOME/$2" else echo "$HOME/$2 already exists, skipping…" fi } mkdir -p $HOME/.config have cvs && link_file cvsrc .cvsrc have fish && link_file fish .config/fish ../ if have fossil; then echo "Setting global fossil settings…" fossil set --global autosync 0 fossil set --global editor 'vim -c "se ft=gitcommit"' fossil set --global mv-rm-files 1 gpg_args="-u 35E1AF8B --clearsign -o" if have gpg2; then fossil set --global clearsign 1 fossil set --global pgp-command "gpg2 $gpg_args" elif have gpg; then fossil set --global clearsign 1 fossil set --global pgp-command "gpg $gpg_args" fi fi have git && link_file git .config/git ../ if have gpg || have gpg2; then mkdir -p $HOME/.local/share/gnupg link_file gpg.conf .local/share/gnupg/gpg.conf ../../../ fi have tmux && link_file tmux .config/tmux ../ have vim && link_file vim .config/vim ../ have youtube-dl && link_file youtube-dl .config/youtube-dl ../ have zsh && link_file zshrc .zshrc if test x"$(uname -s)" = x"Darwin"; then dest="$HOME/Library/Keyboard Layouts/eu_US.keylayout" # This does not like being symlinked… if [ ! -e "$dest" ]; then echo "Hardlinking eu_US.keylayout -> $dest" ln eu_US.keylayout "$dest" else echo "$dest already exists, skipping…" fi elif have startx; then link_file Xdefaults .Xdefaults link_file Xmodmap .Xmodmap link_file xinitrc .xinitrc fi |