Skip to content

Instantly share code, notes, and snippets.

@briatte
Created August 23, 2017 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briatte/8ec75eb04573227b06ae54e0d7854ea3 to your computer and use it in GitHub Desktop.
Save briatte/8ec75eb04573227b06ae54e0d7854ea3 to your computer and use it in GitHub Desktop.
generic code to update a git document
#!/bin/bash
cd $(echo $0 | sed 's#/[^/]*$##')
git pull > /tmp/file.tmp 2>&1
./run.sh >> /tmp/load_portes_etroites.tmp 2>&1
if git status | grep "data/" > /dev/null; then
cat /tmp/load_portes_etroites.tmp
git add documents data
git commit -m "autoupdate"
git push
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment