cppannotations/sourcetar
2008-12-06 12:45:35 +00:00

48 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
PROJECT=annotations
VERSION=`grep DOCVERSION yo/version.yo | sed 's/SUBST(DOCVERSION)(\(.*\))/\1/'`
DISTRIBUTION=c++-${PROJECT}-${VERSION} # define the distribution's dir name
cd ..
tgz()
{
ln -s trunk ${DISTRIBUTION} # distribution's dir name
tar czvf $1 --exclude-from=trunk/excluded ${DISTRIBUTION}/*
rm ${DISTRIBUTION} # rm the link
}
case "$1" in
(o)
tgz ${HOME}/debian/${PROJECT}/tarballs/c++-${PROJECT}_${VERSION}.orig.tar.gz
;;
(t|u)
tgz c++-${PROJECT}_${VERSION}.tar.gz
if [ "$1" == "u" ]
then
scp c++-${PROJECT}_${VERSION}.tar.gz \
oosix:ftp/debian/${PROJECT}
md5sum c++-${PROJECT}_${VERSION}.tar.gz
fi
;;
(*)
echo "
Provide arg:
o (orig.tar.gz) to create a local .orig.tar.gz archive in
../debian/${PROJECT}/tarballs
t (tar.gz) to create ${PROJECT}_${VERSION}.tar.gz in this directory
u (upload) same as 't', but upload to oosix and show MD5 hash
"
exit 1
;;
esac