]> git.mxchange.org Git - friendica-addons.git/blob - buildtgz
improved makefile dependencies checking, posterous connector
[friendica-addons.git] / buildtgz
1 #!/bin/sh
2 # Make doesn't handle subdirs very well 
3 # without providing a Makefile in each one.
4 # So we will just manually find any source
5 # directories which contain any files that 
6 # are newer than are .tgz file and rebuild
7 # it if any are found
8
9 SUBDIRS=`ls -d [a-z]*/ | tr -d /`
10 for a in $SUBDIRS; do
11         TGZ=$a.tgz
12         if [[ ! -f $TGZ ]]; then
13                 echo "Building: " $TGZ
14                 tar zcvf $TGZ $a
15         else
16                 TOUCHED=`find $a -cnewer $TGZ`
17                 if [[ -n $TOUCHED ]]; then
18                         echo "Building: " $TGZ
19                         tar zcvf $TGZ $a
20                 fi
21         fi
22 done