summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibremakepkg10
1 files changed, 3 insertions, 7 deletions
diff --git a/libremakepkg b/libremakepkg
index 2e75288..556314e 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -40,15 +40,14 @@ usage() {
CLEAN=""
CLEAN_CACHE=""
-update_first=0
+update_first="n"
chrootname=${CHCOPY}
while getopts 'hcCun' arg; do
case "${arg}" in
h) usage ;;
c) CLEAN="-c" ;;
- C) CLEAN_CACHE="-C" ;;
- u) update_first=1 ;;
+ u) update_first="y" ;;
n) chrootname="$OPTARG" ;;
*) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;;
esac
@@ -59,12 +58,11 @@ pkgbuild-check-nonfree ||{
if [[ $? -eq 15 ]]; then
error "PKGBUILD contains non-free issues"
exit 15
- else
exit $?
fi
}
-if [ $update_first -eq 1 ]; then
+if [ $update_first = y ]; then
msg "Updating the main chroot"
# -c option in mkarchroot indicates cache
mkarchroot -c ${CACHEDIR} -u -- ${CHROOTDIR}/${CHROOT}
@@ -74,6 +72,4 @@ fi
msg "Creating the package"
makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${chrootname} -- $CLEAN_CACHE $MAKEPKG_ARGS
-umount ${CHROOTDIR}/${chrootname}/var/cache/pacman/pkg
-
exit 0