index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Florian Pritz <bluewind@xinu.at> | 2012-08-11 12:17:56 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-09-14 16:01:01 +0200 |
commit | dbef0b91bf6d0b6d4cc858065f167379fee97156 (patch) | |
tree | a2c2e17852888df2cbcdb14bdbcf358d8861df61 | |
parent | 499f20071a671c84966684d987cb08c29cf2fcf7 (diff) |
-rw-r--r-- | makechrootpkg.in | 4 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 48675d7..9ed7161 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -25,6 +25,7 @@ passeddir= default_copy=$USER [[ -n $SUDO_USER ]] && default_copy=$SUDO_USER [[ -z $default_copy || $default_copy = root ]] && default_copy=copy +src_owner=${SUDO_USER:-$USER} usage() { echo "usage ${0##*/} [options] -r <chrootdir> [--] [makepkg args]" @@ -292,10 +293,12 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then popd >/dev/null fi + chown "$src_owner" "$pkgfile" mv "$pkgfile" "$PKGDEST" done for l in "$copydir"/build/*-{build,check,namcap,package,package_*}.log; do + chown "$src_owner" "$l" [[ -f $l ]] && mv "$l" . done else @@ -304,6 +307,7 @@ else fi for f in "$copydir"/srcdest/*; do + chown "$src_owner" "$f" mv "$f" "$SRCDEST" done |