summaryrefslogtreecommitdiffstats
path: root/makechrootpkg
diff options
context:
space:
mode:
authorJan Steffens <jan.steffens@gmail.com>2011-03-13 17:57:28 +0100
committerJan Steffens <jan.steffens@gmail.com>2011-03-14 02:31:26 +0100
commitf72297a639cda567107f83c1da4eafa2de604d9f (patch)
treebf3fe51b6ec4e925c5b83bc571e12c9632575f0b /makechrootpkg
parentba7cc139c40d77d4f9c60802313d0b5018ca44bd (diff)
downloaddevtools-f72297a639cda567107f83c1da4eafa2de604d9f.tar.gz
devtools-f72297a639cda567107f83c1da4eafa2de604d9f.tar.xz
Use readlink -e to canonicalize chrootdir
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg5
1 files changed, 3 insertions, 2 deletions
diff --git a/makechrootpkg b/makechrootpkg
index e3e2baf..726f828 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -67,8 +67,9 @@ while getopts 'hcudr:I:l:' arg; do
esac
done
-#Get rid of trailing / in chrootdir
-[ "$chrootdir" != "/" ] && chrootdir=$(echo $chrootdir | sed 's#/$##')
+# Canonicalize chrootdir, getting rid of trailing /
+chrootdir=$(readlink -e "$chrootdir")
+
copydir="$chrootdir/$COPY"
# Pass all arguments after -- right to makepkg