poll a git repo and invoke make if something changed
This commit is contained in:
parent
548965d10e
commit
0da7f66aa6
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Usage: pull-and-make directory [make-params]
|
||||
#
|
||||
# This script is intended to continually poll a git repo
|
||||
# It will chdir to its first argument and pull from the remote repo
|
||||
# If there is a new version it will invoke make with the rest of the
|
||||
# arguments
|
||||
set -x
|
||||
set -e
|
||||
cd "$1"
|
||||
shift
|
||||
git pull > ~/tmp/pull-and-make.$$
|
||||
if grep '^Already up to date.$' ~/tmp/pull-and-make.$$
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make "$@"
|
Loading…
Reference in New Issue