minor refactor
This commit is contained in:
16
update
Executable file
16
update
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ~/.dotfiles
|
||||
echo "Checking for dotfile updates..."
|
||||
git fetch
|
||||
|
||||
if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ];
|
||||
then
|
||||
read -p "Dotfiles can be updated. Do you want to proceed? (y/n)" choice
|
||||
case "$choice" in
|
||||
y|Y ) echo "Updating..." && git pull >> /dev/null && echo "Updated successfully";;
|
||||
* ) echo "Skipping";;
|
||||
esac
|
||||
else
|
||||
echo "Dotfiles are up-to-date"
|
||||
fi;
|
Reference in New Issue
Block a user