diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-22 04:00:06 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-22 04:00:06 -0500 |
commit | f54dd21db22dc09f72a67101f3d83d64c21fc404 (patch) | |
tree | 6de1a3d47779f399e8db0259b10fd7deaec00cc5 | |
parent | 12aa89f0d30bfcefdc2dc8a0dabf612d5ce5c70e (diff) |
*fixed error in making clean script
-rwxr-xr-x | libremakepkg | 13 |
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 ./ } |