summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-11-24 11:11:55 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-11-24 11:11:55 -0300
commitb4b5a1441b224299d529380f6b8e19ebd7393718 (patch)
tree485403ab2fcd881fb7056c72257d547f22123545 /libremakepkg
parent40fa0a4c04a34740b40c88a75b7ef1c816cda195 (diff)
parent73f4d0e6498dd590f0181ac8c1c2015d29ad168d (diff)
Merge branch 'master' into fauno
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg40
1 files changed, 14 insertions, 26 deletions
diff --git a/libremakepkg b/libremakepkg
index ef72526..bac9e30 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -136,9 +136,7 @@ if [ ${UID} -ne 0 ]; then
fi
if [ ! -r PKGBUILD ]; then # Check if we are actually on a build directory. Do this early.
-
- error "This isn't a build directory"; usage
-
+ error "This isn't a build directory"; usage
fi
msg "Checking PKGBUILD for non-free issues"
@@ -156,33 +154,23 @@ fi
buildenv
msg "Creating the package"
-if [ -d "${CHROOTDIR}/${CHROOTNAME}" ]; then # use chroot
-
- if [ "${CLEAN_FIRST}" = 'y' ]; then
- msg "Cleaning"
- clean_chroot
- fi
-
- if [ "${UPDATE_FIRST}" = 'y' ]; then
- msg "Updating the chroot in use..."
- mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOTNAME}" # -c option is for cache
- fi
-
- makechrootpkg -r "${CHROOTDIR}" -l "${CHROOTNAME}" -- "${MAKEPKG_ARGS}"
- ev=$? # exit value
-
-else # build new chroot before using
-
- if [ "${UPDATE_FIRST}" = 'y' ]; then # update CHROOT
- msg "Updating the chroot in use..."
- mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOT}" # -c option is for cache
- fi
+if [ ! -d "${CHROOTDIR}/${CHROOTNAME}" ]; then # use chroot
+ mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOT}" # -c option is for cache
+fi
- makechrootpkg -c -r "${CHROOTDIR}" -l "${CHROOTNAME}" -- "${MAKEPKG_ARGS}"
- ev=$? # exit value
+if [ "${CLEAN_FIRST}" = 'y' ]; then
+ msg "Cleaning"
+ clean_chroot
+fi
+if [ "${UPDATE_FIRST}" = 'y' ]; then
+ msg "Updating the chroot in use..."
+ mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOTNAME}" # -c option is for cache
fi
+makechrootpkg -r "${CHROOTDIR}" -l "${CHROOTNAME}" -- "${MAKEPKG_ARGS}"
+ev=$? # exit value
+
copy_log
exit $ev