diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..55d7aca --- /dev/null +++ b/update.sh @@ -0,0 +1,13 @@ +#!/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; \ No newline at end of file