2016-03-16 15:11:51 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-03-18 17:57:58 +01:00
|
|
|
# This scripts installs user configuration by linking it in your home
|
|
|
|
# directory. It goes a little further when needed.
|
|
|
|
|
|
|
|
[[ $PWD == /home/$USER/dotfiles ]] ||
|
|
|
|
echo "!!! WE'RE NOT IN >>>/home/$USER/dotfile/<<< !!!"
|
2016-03-16 15:11:51 +01:00
|
|
|
|
|
|
|
if [[ -z $1 ]]
|
|
|
|
then
|
2016-03-18 17:57:58 +01:00
|
|
|
echo "Usage: $(basename $0) <program name> "
|
|
|
|
echo " "
|
2016-03-16 15:11:51 +01:00
|
|
|
echo "Give a program name and it will install its configuration. There are "
|
|
|
|
echo "available configurations for: "
|
|
|
|
ls -d ~/dotfiles/*/
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
"emacs" )
|
|
|
|
echo "Installing emacs config"
|
|
|
|
git clone https://github.com/syl20bnr/spacemacs.git ~/.emacs.d
|
|
|
|
stow -v emacs
|
|
|
|
exit 0
|
|
|
|
;;
|
2016-03-21 15:41:45 +01:00
|
|
|
"scripts" )
|
|
|
|
stow -v scripts
|
|
|
|
exit 0
|
|
|
|
;;
|
2016-03-16 15:11:51 +01:00
|
|
|
* )
|
|
|
|
echo "$1 cannot be installed…"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|