devtools: clean-up of commitpkg
- replaces backticks by $() - removes support for package names without the arch in them (all our repos now uses the arch in the package name) - removes support for the obsolete and dead [unstable] repo Patch-by: Eric Bélanger <eric@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
d8d0c87614
commit
30aab9b936
10
commitpkg
10
commitpkg
|
@ -13,7 +13,7 @@ if [ -r ~/.makepkg.conf ]; then
|
||||||
source ~/.makepkg.conf
|
source ~/.makepkg.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmd=`basename $0`
|
cmd=$(basename $0)
|
||||||
|
|
||||||
if [ ! -f PKGBUILD ]; then
|
if [ ! -f PKGBUILD ]; then
|
||||||
echo "No PKGBUILD file"
|
echo "No PKGBUILD file"
|
||||||
|
@ -28,23 +28,17 @@ fi
|
||||||
source PKGBUILD
|
source PKGBUILD
|
||||||
pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}
|
pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}
|
||||||
anypkgfile=${pkgname}-${pkgver}-${pkgrel}-any${PKGEXT}
|
anypkgfile=${pkgname}-${pkgver}-${pkgrel}-any${PKGEXT}
|
||||||
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}${PKGEXT}
|
|
||||||
|
|
||||||
if [ ! -f $pkgfile ]; then
|
if [ ! -f $pkgfile ]; then
|
||||||
if [ -f $PKGDEST/$pkgfile ]; then
|
if [ -f $PKGDEST/$pkgfile ]; then
|
||||||
pkgfile=$PKGDEST/$pkgfile
|
pkgfile=$PKGDEST/$pkgfile
|
||||||
anypkgfile=$PKGDEST/$anypkgfile
|
anypkgfile=$PKGDEST/$anypkgfile
|
||||||
oldstylepkgfile=$PKGDEST/$oldstylepkgfile
|
|
||||||
elif [ -f $anypkgfile ]; then
|
elif [ -f $anypkgfile ]; then
|
||||||
pkgfile=$anypkgfile
|
pkgfile=$anypkgfile
|
||||||
CARCH=any
|
CARCH=any
|
||||||
elif [ -f $oldstylepkgfile ]; then
|
|
||||||
pkgfile=$oldstylepkgfile
|
|
||||||
elif [ -f $PKGDEST/$anypkgfile ]; then
|
elif [ -f $PKGDEST/$anypkgfile ]; then
|
||||||
pkgfile=$PKGDEST/$anypkgfile
|
pkgfile=$PKGDEST/$anypkgfile
|
||||||
CARCH=any
|
CARCH=any
|
||||||
elif [ -f $PKGDEST/$oldstylepkgfile ]; then
|
|
||||||
pkgfile=$PKGDEST/$oldstylepkgfile
|
|
||||||
else
|
else
|
||||||
echo "File $pkgfile doesn't exist"
|
echo "File $pkgfile doesn't exist"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -59,8 +53,6 @@ elif [ "$cmd" == "corepkg" ]; then
|
||||||
repo="core"
|
repo="core"
|
||||||
elif [ "$cmd" == "testingpkg" ]; then
|
elif [ "$cmd" == "testingpkg" ]; then
|
||||||
repo="testing"
|
repo="testing"
|
||||||
elif [ "$cmd" == "unstablepkg" ]; then
|
|
||||||
repo="unstable"
|
|
||||||
elif [ "$cmd" == "communitypkg" ]; then
|
elif [ "$cmd" == "communitypkg" ]; then
|
||||||
repo="community"
|
repo="community"
|
||||||
server="aur.archlinux.org"
|
server="aur.archlinux.org"
|
||||||
|
|
Loading…
Reference in New Issue