summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-03-10 16:02:50 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-03-10 16:02:50 -0300
commit0f3c3b4fcaac15db0df82679fd81518bee4e2ea2 (patch)
treee4237092982bd0bad3c2d4aeddee6141a96ec58c
parent10547b604665db1eebc7325ae181c2d3b5f300ec (diff)
LibreMakepkg doesn't clean the chroot copy if any arg is supplied
-rwxr-xr-xlibremakepkg13
1 files changed, 9 insertions, 4 deletions
diff --git a/libremakepkg b/libremakepkg
index a41326f..cf3f13f 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -25,12 +25,17 @@ fi
source /etc/libretools.conf
-echo "Updating the main chroot"
-mkarchroot -u -c ${CACHEDIR} -- ${CHROOTDIR}/${CHROOT}
+[[ -z $1 ]] && {
+ CLEAN="-c"
-mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHCOPY}/var/cache/pacman/pkg || exit 1
+ echo "Updating the main chroot"
+ mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHROOT}/var/cache/pacman/pkg || exit 1
+ mkarchroot -u -- ${CHROOTDIR}/${CHROOT}
+
+ mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHCOPY}/var/cache/pacman/pkg || exit 1
+}
echo "Creating the package"
-makechrootpkg -c -r ${CHROOTDIR} -l ${CHCOPY} -- $@
+makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${CHCOPY} -- $@
exit 0