summaryrefslogtreecommitdiffstats
path: root/makechrootpkg
diff options
context:
space:
mode:
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