2012-02-19 20:31:58 +00:00
|
|
|
#!/bin/bash
|
2011-11-15 03:13:54 +00: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 07:44:20 +00:00
|
|
|
# are newer than our .tgz file and rebuild
|
2011-11-15 03:13:54 +00: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 07:44:20 +00:00
|
|
|
# git log $a > $a/$a.log
|
2012-05-01 06:06:54 +00:00
|
|
|
tar zcvf $TGZ --exclude=.[a-z]* $a
|
2011-11-15 03:13:54 +00:00
|
|
|
else
|
|
|
|
TOUCHED=`find $a -cnewer $TGZ`
|
|
|
|
if [[ -n $TOUCHED ]]; then
|
|
|
|
echo "Building: " $TGZ
|
2012-02-12 07:44:20 +00:00
|
|
|
# git log $a > $a/$a.log
|
2012-05-01 06:06:54 +00:00
|
|
|
tar zcvf $TGZ --exclude=.[a-z]* $a
|
2011-11-15 03:13:54 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|