Skip to content

Instantly share code, notes, and snippets.

@skabber
Created September 13, 2011 13:42
Show Gist options
  • Save skabber/1213826 to your computer and use it in GitHub Desktop.
Save skabber/1213826 to your computer and use it in GitHub Desktop.
Check git for updates.
#!/bin/sh
git remote update
local=$(git rev-list --max-count=1 master)
origin=$(git rev-list --max-count=1 origin/master)
if [ "$local" != "$origin" ];
then
git pull origin master
echo "Lets build it :)"
sh -ex ./build_ota.sh
else
echo "No changes :("
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment