summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-10 21:05:43 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-10 21:05:43 -0500
commit78a08b6b6a1b7a156c998a4c6777041450d893e9 (patch)
treed45eed090c17dd958633ed7d219bee94b07a6343 /libremakepkg
parent79dfb33774ec1d789c6f1b306f607cf0eeea7a6c (diff)
Cleaning
Diffstat (limited to 'libremakepkg')
-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