makechrootpkg: Ensure we have a writable PKGBUILD

For pkgver updates.
This commit is contained in:
Jan Alexander Steffens (heftig) 2013-05-03 14:23:04 +02:00
parent 1489f75419
commit 4dcdbcaf1e
1 changed files with 5 additions and 0 deletions

View File

@ -247,6 +247,11 @@ shopt -s nullglob
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
# Keep PKGBUILD writable for pkgver()
rm /startdir/PKGBUILD*
cp /startdir_host/PKGBUILD* /startdir
chown nobody /startdir/PKGBUILD*
cd /startdir
sudo -u nobody makepkg $makepkg_args || exit 1