Update install script

This commit is contained in:
2024-12-23 18:43:10 +01:00
parent 1d41d14a6a
commit 5a6f293d90
2 changed files with 15 additions and 5 deletions

View File

@@ -20,4 +20,4 @@ My dotfiles. If you want to use them fork or clone the repo. Each branch has spe
* `config submodule update` * `config submodule update`
* `source .zshrc` * `source .zshrc`
## [Full Guide](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/) **[Full Guide](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/)**

View File

@@ -6,10 +6,20 @@ if [ $# -eq 0 ]
exit 1; exit 1;
fi fi
BRANCH=$1
echo ".dotfiles" >> $HOME/.gitignore echo ".dotfiles" >> $HOME/.gitignore
git clone --bare https://github.com/LordMathis/dotfiles.git $HOME/.dotfiles git clone --bare https://github.com/LordMathis/dotfiles.git $HOME/.dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
config checkout $1 function config {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME "$@"
}
cd $HOME
config checkout $BRANCH
config submodule init config submodule init
config submodule update config submodule update --recursive --remote
source .zshrc