2004-07-19 07:16:56 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source /etc/makepkg.conf
|
|
|
|
|
|
|
|
cmd=`basename $0`
|
|
|
|
|
2004-09-28 20:57:58 +02:00
|
|
|
if [ ! -f PKGBUILD ]; then
|
|
|
|
echo "No PKGBUILD file"
|
2004-07-19 07:16:56 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2004-09-28 20:57:58 +02:00
|
|
|
source PKGBUILD
|
|
|
|
pkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
|
|
|
|
|
2006-03-20 03:48:43 +01:00
|
|
|
if [ ! -f $pkgfile ]; then
|
|
|
|
pkgfile=$PKGDEST/$pkgfile
|
|
|
|
fi
|
|
|
|
|
2004-09-28 20:57:58 +02:00
|
|
|
if [ ! -f $pkgfile ]; then
|
|
|
|
echo "File $pkgfile doesn't exist"
|
2004-07-19 07:16:56 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$cmd" == "extrapkg" ]; then
|
|
|
|
repo="extra"
|
|
|
|
tag="CURRENT"
|
|
|
|
elif [ "$cmd" == "currentpkg" ]; then
|
|
|
|
repo="current"
|
|
|
|
tag="CURRENT"
|
|
|
|
elif [ "$cmd" == "testingpkg" ]; then
|
|
|
|
repo="testing"
|
|
|
|
tag="TESTING"
|
|
|
|
elif [ "$cmd" == "unstablepkg" ]; then
|
|
|
|
repo="unstable"
|
|
|
|
tag="CURRENT"
|
2005-05-17 08:28:33 +02:00
|
|
|
elif [ "$cmd" == "communitypkg" ]; then
|
|
|
|
repo="community"
|
|
|
|
tag="CURRENT"
|
2004-07-19 07:16:56 +02:00
|
|
|
fi
|
|
|
|
|
2005-05-17 15:46:22 +02:00
|
|
|
if [ "$repo" != "community" ]; then
|
2006-03-20 03:48:12 +01:00
|
|
|
scp $pkgfile archlinux.org:staging/$repo/add
|
2005-05-17 08:28:33 +02:00
|
|
|
else
|
|
|
|
if [ ! -f ~/.tupkg ]; then
|
|
|
|
echo "Must configure tupkg via ~/.tupkg, cancelled"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
tupkg $pkgfile
|
|
|
|
fi
|
2004-08-22 22:24:02 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Cancelled"
|
|
|
|
exit 1
|
|
|
|
fi
|
2004-07-19 07:16:56 +02:00
|
|
|
echo "===> Uploaded $pkgfile"
|
2004-08-22 22:24:02 +02:00
|
|
|
|
2004-07-24 05:49:38 +02:00
|
|
|
if [ "$1" != "" ]; then
|
2004-10-22 02:46:21 +02:00
|
|
|
cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel
|
2004-07-24 05:49:38 +02:00
|
|
|
$1" > /dev/null
|
2004-08-22 22:24:02 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Cancelled"
|
|
|
|
exit 1
|
|
|
|
fi
|
2004-10-22 02:46:21 +02:00
|
|
|
echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel
|
2004-07-24 05:49:38 +02:00
|
|
|
$1\" message"
|
|
|
|
else
|
2004-10-22 02:46:21 +02:00
|
|
|
cvs commit -m "upgpkg: $pkgname $pkgver-$pkgrel" > /dev/null
|
2004-08-22 22:24:02 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Cancelled"
|
|
|
|
exit 1
|
|
|
|
fi
|
2004-10-22 02:46:21 +02:00
|
|
|
echo "===> Commited with \"upgpkg: $pkgname $pkgver-$pkgrel\" message"
|
2004-07-24 05:49:38 +02:00
|
|
|
fi
|
2004-08-22 22:24:02 +02:00
|
|
|
|
2004-07-19 07:16:56 +02:00
|
|
|
cvs tag -c -F -R $tag > /dev/null
|
2004-08-22 22:24:02 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Cancelled"
|
|
|
|
exit 1
|
|
|
|
fi
|
2004-07-19 07:16:56 +02:00
|
|
|
echo "===> Tagged as $tag"
|