summaryrefslogtreecommitdiff
path: root/makechrootpkg
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-07-25 20:28:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-07-25 20:37:48 +0200
commit74df2a90d8bafe9423a3834657de1046cc0ae0fb (patch)
treec5d0f20a7419d0c90bfa1a80c6eb9033d6d00dab /makechrootpkg
parent8384ad849dfe308ed3e63e252785b9a6f80474f5 (diff)
downloaddevtools-74df2a90d8bafe9423a3834657de1046cc0ae0fb.tar.xz
makechrootpkg: support absolute paths for chroot copy
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg8
1 files changed, 6 insertions, 2 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 1a6d8e5..a60c9fe 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -74,8 +74,12 @@ done
# Canonicalize chrootdir, getting rid of trailing /
chrootdir=$(readlink -e "$chrootdir")
-[[ -z $copy ]] && copy=$default_copy
-copydir="$chrootdir/$copy"
+if [[ ${copy:0:1} = "/" ]]; then
+ copydir=$copy
+else
+ [[ -z $copy ]] && copy=$default_copy
+ copydir="$chrootdir/$copy"
+fi
# Pass all arguments after -- right to makepkg
MAKEPKG_ARGS="$MAKEPKG_ARGS ${*:$OPTIND}"