summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg13
1 files changed, 10 insertions, 3 deletions
diff --git a/libremakepkg b/libremakepkg
index 2055002..cf3f13f 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -25,10 +25,17 @@ fi
source /etc/libretools.conf
-echo "Updating the main chroot"
-mkarchroot -u -c ${CACHEDIR} -- ${CHROOTDIR}/${CHROOT}
+[[ -z $1 ]] && {
+ CLEAN="-c"
+
+ 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