diff options
-rwxr-xr-x | libremakepkg | 12 | ||||
-rwxr-xr-x | librerepkg | 4 |
2 files changed, 8 insertions, 8 deletions
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 @@ -48,5 +48,5 @@ mv rePKGBUILD PKGBUILD msg2 "Updating md5sums" makepkg -g >> PKGBUILD msg "Repackaging using libremakepkg" -sudo libremakepkg -cu - +sudo libremakepkg -cu -L +stdnull "popd ${tempdir}" |