Browse Source

avoid ./ in symlink paths, use readlink instead of ls to resolve link

signals
John Regan 3 years ago committed by Gavin D. Howard
parent
commit
aee557ea9d
  1. 3
      install.sh
  2. 5
      link.sh

3
install.sh

@ -39,8 +39,7 @@ for exe in $bindir/*; do
base=$(basename "$exe")
if [ -L "$exe" ]; then
L=$(ls -dl "$exe")
link=$(printf ${L#*-> })
link=$(readlink "$exe")
"$INSTALL" -Dlm 755 "$link$exec_suffix" "$installdir/$base$exec_suffix"
else
"$INSTALL" -Dm 755 "$exe" "$installdir/$base$exec_suffix"

5
link.sh

@ -27,9 +27,8 @@ shift
link="$1"
shift
cd "$bindir"
for exe in ./*; do
for exe in "$bindir"/*; do
if [ ! -L "$exe" ]; then
@ -42,7 +41,7 @@ for exe in ./*; do
name="$link"
fi
ln -fs "$exe" "./$name"
ln -fs "$base" "$bindir/$name"
fi
done

Loading…
Cancel
Save