dotfiles/update.sh

13 lines
338 B
Bash
Raw Normal View History

2024-09-04 15:20:16 +02:00
#!/bin/bash
cd ~/.dotfiles
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";;
* ) echo "skipping";;
esac
fi;