#!/bin/sh set -e if [ ${PWD} != "/home/tmu/dotfiles" ]; then echo "Not in ~/dotfiles, proceed manually" exit 1 fi git submodule update --init --recursive confirm () { read -e -p "$1 [y/N]> " echo $REPLY | grep -qi "y" } if confirm "Check and install symlinks?"; then here="/home/tmu/dotfiles/" there="/home/tmu/" mkdir -p ${there}.config mkdir -p ${there}.local/bin ln -s ${here}config/emacs ${there}.emacs.d ln -s ${here}config/profile ${there}.profile ln -s ${here}config/tcshrc ${there}.tcshrc ln -s ${here}config/xinitrc ${there}.xinitrc ln -s ${here}config/tmux.conf ${there}.tmux.conf ln -s ${here}config/xserverrc ${there}.xserverrc ln -s ${here}config/Xdefaults ${there}.Xdefaults ln -s ${here}config/vis ${there}.config/vis ln -s ${here}config/alacritty ${there}.config/alacritty ln -s ${here}config/qutebrowser ${there}.config/qutebrowser ln -s ${here}config/fbterm/fbtermrc ${there}.config/fbtermrc ln -s ${here}config/fbterm/fbterm-emacs.sh ${there}.local/bin/fbterm-emacs.sh ln -s ${here}scripts/brightness/brightnessup ${there}.local/bin/brightnessup ln -s ${here}scripts/brightness/brightnessdown ${there}.local/bin/brightnessdown ln -s ${here}scripts/brightness/brightnessmax ${there}.local/bin/brightnessmax ln -s ${here}scripts/volume/volumeup ${there}.local/bin/volumeup ln -s ${here}scripts/volume/volumedown ${there}.local/bin/volumedown ln -s ${here}scripts/volume/volumemute ${there}.local/bin/volumemute ln -s ${here}scripts/misc/lk.sh ${there}.local/bin/lk ln -s ${here}scripts/misc/lk.sh ${there}.local/bin/l ln -s ${here}scripts/misc/pass-menu.sh ${there}.local/bin/pass-menu ln -s ${here}scripts/misc/battery.sh ${there}.local/bin/tmubattery fi echo "All set up, remember to source ~/.profile and symlink tmubrowse and tmuterm."