cppannotations/sourcetar

49 lines
1.1 KiB
Text
Raw Normal View History

#!/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 -P ..
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
(d)
tgz ${HOME}/debian/${PROJECT}/tarballs/c++-${PROJECT}_${VERSION}.orig.tar.gz
;;
(l|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:
d (debian) to create a local .orig.tar.gz archive in
../debian/${PROJECT}/tarballs
l (local) 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