Skip to content

Instantly share code, notes, and snippets.

View SathvikKS's full-sized avatar
💭
Give me some work

Sathvik K S SathvikKS

💭
Give me some work
View GitHub Profile
@SathvikKS
SathvikKS / update
Created December 25, 2018 01:58
Auto Update script.
dir="/path/to/local/repo/"
cd $HOME/$dir
git checkout origin/master *
echo "Searching for updates. Please wait :)"
touch $HOME/.sksupdater
rm $HOME/.sksupdater
git fetch --dry-run 2>&1 > /dev/null| tee $HOME/.sksupdater
up=$HOME/.sksupdater
if grep -q origin/master "$up"; then
clear