2012-02-19 15:31:58 -05:00
|
|
|
#!/bin/bash
|
2011-11-14 22:13:54 -05:00
|
|
|
# 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
|
2012-05-01 02:06:54 -04:00
|
|
|
tar zcvf $TGZ --exclude=.[a-z]* $a
|
2011-11-14 22:13:54 -05:00
|
|
|
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
|
2012-05-01 02:06:54 -04:00
|
|
|
tar zcvf $TGZ --exclude=.[a-z]* $a
|
2011-11-14 22:13:54 -05:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|