#!/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;