Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Auto Mirror channel_v3.json (Wbond Package-Control Issues #1057)
byte=`curl -s | wc -c`
if [ $byte -gt 2000000 ]; then
echo "OK! mirror it"
cp channel_v3.json channel_v3.json-old
curl -s -o channel_v3.json
cmp -s channel_v3.json channel_v3.json-old
if [ $? == 0 ]; then
echo "We don't need update now"
echo "Update data to github now"
git commit -a -m "update"
git push
echo "Failed, We need keep last data now"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment