From f72297a639cda567107f83c1da4eafa2de604d9f Mon Sep 17 00:00:00 2001 From: Jan Steffens Date: Sun, 13 Mar 2011 17:57:28 +0100 Subject: Use readlink -e to canonicalize chrootdir --- makechrootpkg | 5 +++-- 1 file 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 -- cgit v1.2.3-70-g09d2