From d7e07174e2dae3d1bd9ec79c90cba9912f2cef0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Tue, 10 May 2011 17:00:22 -0500 Subject: * Clean cache option for libremakepkg --- libremakepkg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libremakepkg') diff --git a/libremakepkg b/libremakepkg index 6b996dc..ef276f3 100755 --- a/libremakepkg +++ b/libremakepkg @@ -39,13 +39,15 @@ usage() { } CLEAN="" +CLEAN_CACHE="" update_first=0 chrootname=${CHCOPY} -while getopts 'hcun' arg; do +while getopts 'hcCun' arg; do case "${arg}" in h) usage ;; c) CLEAN="-c" ;; + C) CLEAN_CACHE="-C" u) update_first=1 ;; n) chrootname="$OPTARG" ;; *) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;; @@ -62,17 +64,15 @@ pkgbuild-check-nonfree ||{ fi } -mount -o bind ${CACHEDIR} \ - ${CHROOTDIR}/${chrootname}/var/cache/pacman/pkg || exit 1 - if [ $update_first -eq 1 ]; then msg "Updating the main chroot" - mkarchroot $CLEAN ${CACHEDIR} -u -- ${CHROOTDIR}/${CHROOT} + # -c option in mkarchroot indicates cache + mkarchroot -c ${CACHEDIR} -u -- ${CHROOTDIR}/${CHROOT} fi msg "Creating the package" -makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${chrootname} -- $MAKEPKG_ARGS +makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${chrootname} -- $CLEAN_CACHE $MAKEPKG_ARGS umount ${CHROOTDIR}/${chrootname}/var/cache/pacman/pkg -- cgit v1.2.3-2-g168b