summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibremakepkg13
1 files changed, 7 insertions, 6 deletions
diff --git a/libremakepkg b/libremakepkg
index 98adb80..babed47 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -119,28 +119,29 @@ if [ "${UPDATE_FIRST}" = y ]; then
fi
if [ "${CLEAN_FIRST}" = y ]; then
- msg "Cleaning ..."
+ msg "Cleaning"
plain "making list of packages in ${CHROOTDIR}/${CHROOTNAME}/root/"
- cp "/etc/libretools.d/cleansystem" "${CHROOTDIR}/${CHROOTNAME}/root/"
+ cp "/etc/libretools.d/cleansystem" "${CHROOTDIR}/${CHROOTNAME}/root/cleansystem"
(cat <<EOF
#!/bin/bash
export LANG=C
-pkgs=($(comm -23 <(pacman -Qq | sort) <(sort /root/cleansystem)))
+pkgs=(\$(comm -23 <(pacman -Qq | sort) <(sort /root/cleansystem)))
-[ ${#pkgs[@]} -gt 0 ] && pacman --noconfirm -Rcs ${pkgs} || echo "done"
+[ \${#pkgs[@]} -gt 0 ] && pacman --noconfirm -Rcs \${pkgs} || echo "done"
EOF
) > "${CHROOTDIR}/${CHROOTNAME}/clean"
+ echo -n "doing cleanup..."
mkarchroot -r "/clean" "${CHROOTDIR}/${CHROOTNAME}"
fi
msg "Creating the package"
-makechrootpkg -r ${CHROOTDIR} -l "${chrootname}" -- ${MAKEPKG_ARGS}
+makechrootpkg -r ${CHROOTDIR} -l "${CHROOTNAME}" -- ${MAKEPKG_ARGS}
ev=$? # exit value
-[ "${USE_LOG}" == 'y' -a -e ${CHROOTDIR}/${chrootname}/build/*.log ] && {
+[ "${USE_LOG}" == 'y' -a -e ${CHROOTDIR}/${CHROOTNAME}/build/*.log ] && {
cp ${CHROOTDIR}/${chrootname}/build/*.log ./
}