Browse Source

Add a readlink function in the install script

signals
Gavin Howard 3 years ago
parent
commit
e26c6f9d0a
Signed by untrusted user who does not match committer: gavin
GPG Key ID: C08038BDF280D33E
  1. 12
      install.sh

12
install.sh

@ -19,6 +19,16 @@ usage() {
exit 1
}
readlink() {
local exe="$1"
shift
L=$(ls -dl "$exe")
printf ${L#*-> }
}
script="$0"
scriptdir=$(dirname "$script")
@ -40,7 +50,7 @@ for exe in $bindir/*; do
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"

Loading…
Cancel
Save