diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-05-14 20:24:53 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-05-14 20:24:53 -0500 |
commit | 0fa9894cbc10f0742c3076666524956f7279e8af (patch) | |
tree | b80bf587877ecb266c768278c49cc452d970fcf3 | |
parent | 92d1fe72f7ec9deea70772aa41ec1e29072599c8 (diff) |
* libremessages use chrootname optarg indeed
-rwxr-xr-x | libremakepkg | 12 | ||||
-rwxr-xr-x | libremessages | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/libremakepkg b/libremakepkg index aa29572..f2b523d 100755 --- a/libremakepkg +++ b/libremakepkg @@ -43,12 +43,12 @@ CLEAN_CACHE="" update_first="n" chrootname=${CHCOPY} -while getopts 'hcun' arg; do +while getopts 'hcun:' arg; do case "${arg}" in - h) usage ;; + h) usage; exit 0 ;; c) CLEAN="-c" ;; u) update_first="y" ;; - n) chrootname="$OPTARG" ;; + n) chrootname="$OPTARG"; echo $chrootname ;; *) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;; esac done @@ -60,16 +60,16 @@ pkgbuild-check-nonfree ||{ exit 15 exit $? fi -} +} if [ $update_first = y ]; then msg "Updating the main chroot" # -c option in mkarchroot indicates cache - mkarchroot -c ${CACHEDIR} -u -- ${CHROOTDIR}/${CHROOT} + mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOT}" fi msg "Creating the package" -makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${chrootname} -- $MAKEPKG_ARGS +makechrootpkg $CLEAN -r ${CHROOTDIR} -l "${chrootname}" -- $MAKEPKG_ARGS exit 0 diff --git a/libremessages b/libremessages index 9fbbc2b..c297f2d 100755 --- a/libremessages +++ b/libremessages @@ -46,8 +46,7 @@ else fi stdnull() { - local action=$1; - eval "${action} >/dev/null 2>&1" + eval "$@ >/dev/null 2>&1" } plain() { |