Merge branch 'main' of github.com:jim-fx/.dotfiles
This commit is contained in:
15
configs/zsh/update-repo.zsh
Normal file
15
configs/zsh/update-repo.zsh
Normal file
@@ -0,0 +1,15 @@
|
||||
if [ -d "~/.dotfiles" ]; then
|
||||
|
||||
currentDir=$(pwd)
|
||||
|
||||
VN=$(git describe --abbrev=7 HEAD 2>/dev/null)
|
||||
|
||||
git update-index -q --refresh
|
||||
CHANGED=$(git diff-index --name-only HEAD --)
|
||||
if [ ! -z $CHANGED ]; then
|
||||
cd ~/.dotfiles
|
||||
git reset --hard origin/main
|
||||
git pull origin main
|
||||
zshu
|
||||
fi
|
||||
fi
|
Reference in New Issue
Block a user