From 06f10b87d16d4c83016ff3ef21217494f921d93b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 28 Nov 2012 22:10:26 -0500 Subject: many fixes --- src/chroot-tools/libremakepkg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/chroot-tools/libremakepkg') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index b9107d8..f06bb17 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -62,10 +62,10 @@ makepkg_conf_get() { if [[ -f $LIBREHOME/.makepkg.conf ]]; then eval $(grep "^$setting=" "$LIBREHOME/.makepkg.conf") fi - if [[ -z ${!setting} ]]; then + if [[ -z ${!setting:-} ]]; then eval $(grep "^$setting=" "/etc/makepkg.conf") fi - if [[ -z ${!setting} && -n ${2} ]]; then + if [[ -z ${!setting:-} && -n ${2} ]]; then eval "$setting='$2'" fi } @@ -78,7 +78,7 @@ chroot_makepkg_conf_get() { chroot_makepkg_conf_set() { local key=$1 local val=$2 - sed -i "/^$KEY=/d" "$copydir/etc/makepkg.conf" + sed -i "/^$key=/d" "$copydir/etc/makepkg.conf" echo "$key='$val'" >> "$copydir/etc/makepkg.conf" } @@ -133,7 +133,7 @@ main() { CHROOTCOPY=$LIBREUSER [[ $CHROOTCOPY != root ]] || CHROOTCOPY=copy - makepkg_args=(-s --noconfirm -L) + makepkg_args='-s --noconfirm -L ' REPACKAGE=false MAKEPKG=makepkg @@ -142,14 +142,14 @@ main() { n) CHROOT=$OPTARG;; l) CHROOTCOPY=$OPTARG;; m) MAKEPKG=$OPTARG;; - R) REPACKAGE=true; makepkg_args+=(-R);; + R) REPACKAGE=true; makepkg_args+=' -R ';; h) usage; exit 0;; *) usage; exit 1;; esac done shift $(($OPTIND - 1)) # Pass all arguments after -- right to makepkg - makepkg_args+=("$@") + makepkg_args+=" $*" rootdir="${CHROOTDIR}/${CHROOT}/root" copydir="${CHROOTDIR}/${CHROOT}/${CHROOTCOPY}" @@ -176,7 +176,7 @@ main() { # OK, we're starting now ############################################### - lock_open_write 9 "$copydir.lock" "Locking chroot '$copy'" + lock_open_write 9 "$copydir" "Locking chroot '$CHROOTCOPY'" # Set target CARCH as it might be used within the PKGBUILD to select correct sources chroot_makepkg_conf_get CARCH -- cgit v1.2.3-54-g00ecf