mirror of
https://github.com/lordmathis/dotfiles.git
synced 2025-11-05 17:24:22 +00:00
Update install script
This commit is contained in:
@@ -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/)**
|
||||||
|
|||||||
18
install.sh
18
install.sh
@@ -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
|
|
||||||
Reference in New Issue
Block a user