mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-14 18:36:18 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e8490b3f14 | ||
![]() |
ff1fc799c3 |
30
extrapkg
30
extrapkg
@@ -20,6 +20,20 @@ if [ ! -f PKGBUILD ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# define tags and staging areas based on architecture
|
||||||
|
if [ "$CARCH" = "i686" ]; then
|
||||||
|
currenttag='CURRENT'
|
||||||
|
testingtag='TESTING'
|
||||||
|
suffix=''
|
||||||
|
elif [ "$CARCH" = "x86_64" ]; then
|
||||||
|
currenttag='CURRENT-64'
|
||||||
|
testingtag='TESTING-64'
|
||||||
|
suffix='64'
|
||||||
|
else
|
||||||
|
echo "CARCH must be set to a recognized value!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
source PKGBUILD
|
source PKGBUILD
|
||||||
pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
|
pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
|
||||||
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
|
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
|
||||||
@@ -40,19 +54,19 @@ fi
|
|||||||
|
|
||||||
if [ "$cmd" == "extrapkg" ]; then
|
if [ "$cmd" == "extrapkg" ]; then
|
||||||
repo="extra"
|
repo="extra"
|
||||||
tag="CURRENT"
|
tag="$currenttag"
|
||||||
elif [ "$cmd" == "corepkg" ]; then
|
elif [ "$cmd" == "corepkg" ]; then
|
||||||
repo="core"
|
repo="core"
|
||||||
tag="CURRENT"
|
tag="$currenttag"
|
||||||
elif [ "$cmd" == "testingpkg" ]; then
|
elif [ "$cmd" == "testingpkg" ]; then
|
||||||
repo="testing"
|
repo="testing"
|
||||||
tag="TESTING"
|
tag="$testingtag"
|
||||||
elif [ "$cmd" == "unstablepkg" ]; then
|
elif [ "$cmd" == "unstablepkg" ]; then
|
||||||
repo="unstable"
|
repo="unstable"
|
||||||
tag="CURRENT"
|
tag="$currenttag"
|
||||||
elif [ "$cmd" == "communitypkg" ]; then
|
elif [ "$cmd" == "communitypkg" ]; then
|
||||||
repo="community"
|
repo="community"
|
||||||
tag="CURRENT"
|
tag="$currenttag"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# see if any limit options were passed, we'll send them to SCP
|
# see if any limit options were passed, we'll send them to SCP
|
||||||
@@ -63,8 +77,10 @@ if [ "$1" = "-l" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$repo" != "community" ]; then
|
if [ "$repo" != "community" ]; then
|
||||||
scp ${scpopts} ${pkgfile} archlinux.org:staging/$repo/add/$(basename ${pkgfile})
|
# combine what we know into a variable (suffix defined based on $CARCH)
|
||||||
if [ "$(md5sum ${pkgfile} | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum staging/${repo}/add/$(basename ${pkgfile}) | cut -d' ' -f1)" ]; then
|
uploadto="staging/${repo}${suffix}/add/$(basename ${pkgfile})"
|
||||||
|
scp ${scpopts} "${pkgfile}" "archlinux.org:${uploadto}"
|
||||||
|
if [ "$(md5sum "${pkgfile}" | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum "${uploadto}" | cut -d' ' -f1)" ]; then
|
||||||
echo "File got corrupted during upload, cancelled."
|
echo "File got corrupted during upload, cancelled."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
@@ -107,7 +107,7 @@ echo "building union chroot"
|
|||||||
grep -Fq unionfs /proc/filesystems
|
grep -Fq unionfs /proc/filesystems
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
modprobe -q unionfs
|
modprobe -q unionfs
|
||||||
if [ $? -ne 0 ];
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: No unionfs available. Abandon ship!" && exit 1
|
echo "ERROR: No unionfs available. Abandon ship!" && exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user