Compare commits

...

6 Commits

Author SHA1 Message Date
Mathis fee835708f Update 'install.sh' 2023-02-08 20:41:05 +00:00
Mathis 0d4d2de665 Update 'install.sh' 2023-02-08 20:40:05 +00:00
LordMathis 642187d71e Add script install option to README 2023-02-06 22:12:48 +01:00
LordMathis 8b5f2bffa8 Exit script if no branch supplied 2023-02-06 21:55:31 +01:00
LordMathis dcdea6b580 Add install script 2023-02-06 21:44:22 +01:00
LordMathis a1200a3534 Fix README 2023-02-04 21:18:15 +01:00
2 changed files with 21 additions and 2 deletions

View File

@ -6,14 +6,18 @@ My dotfiles. If you want to use them fork or clone the repo. Each branch has spe
* [git](https://git-scm.com/), [zsh](http://www.zsh.org/) and [bat](https://github.com/sharkdp/bat)
## Usage
## Install
`curl https://git.namesny.com/Mathis/dotfiles/raw/branch/master/install.sh | zsh -s -- <branch name>`
## Manual install
* `echo ".dotfiles" >> .gitignore`
* `git clone --bare git@git.namesny.com:Mathis/dotfiles.git $HOME/.dotfiles`
* `alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`
* `config checkout <branch-name>`
* `config submodule init`
* `config submodule update`
* `config checkout`
* `source .zshrc`
## [Full Guide](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/)

15
install.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/zsh
if [ $# -eq 0 ]
then
echo "Git branch name missing"
exit 1;
fi
echo ".dotfiles" >> $HOME/.gitignore
git clone --bare https://git.namesny.com/Mathis/dotfiles.git $HOME/.dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
config checkout $1
config submodule init
config submodule update
source .zshrc