]> git.mxchange.org Git - friendica-addons.git/blob - buildtgz
Birthday cake smiley.
[friendica-addons.git] / buildtgz
1 #!/bin/bash
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 our .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 #               git log $a > $a/$a.log
15                 tar zcvf $TGZ --exclude=.[a-z]* $a
16         else
17                 TOUCHED=`find $a -cnewer $TGZ`
18                 if [[ -n $TOUCHED ]]; then
19                         echo "Building: " $TGZ
20 #                       git log $a > $a/$a.log
21                         tar zcvf $TGZ --exclude=.[a-z]* $a
22                 fi
23         fi
24 done