Files
dotfiles/install.sh
2024-12-23 18:43:10 +01:00

25 lines
405 B
Bash
Executable File

#!/usr/bin/zsh
if [ $# -eq 0 ]
then
echo "Git branch name missing"
exit 1;
fi
BRANCH=$1
echo ".dotfiles" >> $HOME/.gitignore
git clone --bare https://github.com/LordMathis/dotfiles.git $HOME/.dotfiles
function config {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME "$@"
}
cd $HOME
config checkout $BRANCH
config submodule init
config submodule update --recursive --remote