makedist.sh from gzz at Krugle
Show makedist.sh syntax highlighted
#!/bin/sh
# makedist.sh
# *
# This file is part of Gzz.
#
# Gzz is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Gzz is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
# Public License for more details.
#
# You should have received a copy of the GNU Lesser General
# Public License along with Gzz; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# *
# * Written by Antti-Juhani Kaijanaho
set -e
sign=no
cont=true
while $cont
do
case "$1" in
-sign) sign=yes
shift ;;
*) cont=false ;;
esac
done
srcdir=${2:-$(pwd)}
distdir=${1:-$(pwd)/gzigzag-dist}
rm -rf $distdir
. makedist.param
if [ "$cvstree" = "yes" ]
then
make Manifest
else
if [ ! -f Manifest ]
then
echo "Manifest is missing"
exit 1
fi
fi
for d in $((for f in $(cat Manifest) ; do dirname $f ; done) | sort | uniq)
do
echo -n "Making directory $distdir/$d ..."
mkdir -p $distdir/$d
echo "done."
done
for f in $(cat Manifest)
do
echo -n "Copying $f ..."
ln $f $distdir/$f
echo "done."
done
cat Manifest | xargs md5sum > $distdir/md5sum
if [ "$sign" = "yes" ]
then
gpg --clearsign $distdir/md5sum
mv $distdir/md5sum.asc $distdir/md5sum
fi
See more files for this project here