1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-21 08:15:01 -05:00

Script fixes

This commit is contained in:
Travis Burtrum 2016-11-05 01:28:10 -04:00
parent 190707f9af
commit a3c56c41af

View File

@ -96,7 +96,8 @@ sign_packages() {
set -e set -e
cd $(dirname $1) cd $(dirname $1)
for pkg in "$@"; do for pkg in "$@"; do
gpg --detach-sign --use-agent $pkg rm -f "${pkg}.sig"
gpg -u 'ECB9B8CBAAC68C03!' --detach-sign --use-agent $pkg
done done
) )
} }
@ -197,20 +198,27 @@ setup() {
clean() { clean() {
( (
set -e set -e
if [ "$#" -lt 1 ]; then if [ "$#" -lt 1 ]; then
echo "Must specify repository names to clean" echo "Must specify repository names to clean"
return 1 return 1
fi fi
for repo in "$@"; do for repo in "$@"; do
# Clean repository and chroot # Clean repository and chroot
if [ -d $basedir/chroot/$repo ]; then if [ -d $basedir/chroot/$repo ]; then
exe sudo rm -rf $basedir/chroot/$repo $basedir/chroot/$repo.lock # Test if chroot uses BTRFS and remove using btrfs subvolume delete
fi if [ `stat --format=%i $basedir/chroot/$repo` -eq 256 ] && [ `stat -f --format=%T $basedir/chroot/$repo` ] ; then
if [ -d $basedir/$repo ]; then exe sudo btrfs subvolume delete $basedir/chroot/$repo
exe rm -rf $basedir/$repo exe sudo rm $basedir/chroot/$repo.lock
fi # Otherwise delete using rm
done else
exe sudo rm -rf $basedir/chroot/$repo $basedir/chroot/$repo.lock
fi
fi
if [ -d $basedir/$repo ]; then
exe rm -rf $basedir/$repo
fi
done
) )
} }