configs  Artifact [23a24a90bf]

Artifact 23a24a90bf95ea04d25c0f16310475d4b60069f3a5b6bc83777d659ecab1a3d5:

  • Executable file create_symlinks.sh — part of check-in [09fe98aab3] at 2020-01-21 00:11:28 on branch trunk — Add fish config (user: js size: 766)

#!/bin/sh
rel_dir="${PWD#$HOME/}"
echo "Configs relative to home in $rel_dir."

link_file() {
	if [ ! -f "$HOME/$2" ]; then
		ln -s "$3$rel_dir/$1" "$HOME/$2"
	else
		echo "$HOME/$2 already exists, skipping..."
	fi
}

link_file gitconfig .gitconfig
mkdir -p $HOME/.gnupg
link_file gpg.conf .gnupg/gpg.conf ../
link_file tmux.conf .tmux.conf
link_file vim .vim
link_file vimrc .vimrc
link_file config/fish .config/fish ../
mkdir -p $HOME/.config/youtube-dl
link_file config/youtube-dl/config .config/youtube-dl/config ../../
link_file zshrc .zshrc

if test x"$(uname -s)" = x"Darwin"; then
	link_file eu_US.keylayout \
		"Library/Keyboard Layouts/eu_US.keylayout" ../../
else
	link_file Xdefaults .Xdefaults
	link_file Xmodmap .Xmodmap
	link_file xinitrc .xinitrc
fi