2011-11-14 22:13:54 -05:00
|
|
|
#!/bin/sh
|
|
|
|
# Make doesn't handle subdirs very well
|
|
|
|
# without providing a Makefile in each one.
|
|
|
|
# So we will just manually find any source
|
|
|
|
# directories which contain any files that
|
2012-02-12 02:44:20 -05:00
|
|
|
# are newer than our .tgz file and rebuild
|
2011-11-14 22:13:54 -05:00
|
|
|
# it if any are found
|
|
|
|
|
|
|
|
SUBDIRS=`ls -d [a-z]*/ | tr -d /`
|
|
|
|
for a in $SUBDIRS; do
|
|
|
|
TGZ=$a.tgz
|
|
|
|
if [[ ! -f $TGZ ]]; then
|
|
|
|
echo "Building: " $TGZ
|
2012-02-12 02:44:20 -05:00
|
|
|
# git log $a > $a/$a.log
|
2011-11-14 22:13:54 -05:00
|
|
|
tar zcvf $TGZ $a
|
|
|
|
else
|
|
|
|
TOUCHED=`find $a -cnewer $TGZ`
|
|
|
|
if [[ -n $TOUCHED ]]; then
|
|
|
|
echo "Building: " $TGZ
|
2012-02-12 02:44:20 -05:00
|
|
|
# git log $a > $a/$a.log
|
2011-11-14 22:13:54 -05:00
|
|
|
tar zcvf $TGZ $a
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|