Compare commits

...

2 Commits

Author SHA1 Message Date
Sean Hickey 7dad1b611c Fix typos 2021-08-29 16:13:59 -07:00
Sean Hickey 4d7ab7a25a Add more portable version of readlink 2021-08-29 16:11:03 -07:00
1 changed files with 7 additions and 4 deletions

View File

@ -8,9 +8,12 @@ set -o nounset
file=$1
install_dir="${HOME}/.local/bin"
filename=$(basename "$file")
mkdir -p $install_dir
ln -sf "$file" "${install_dir}/${filename}"
path=$(dirname "$file")
filename=$(basename "$file")
canonical_path=$(cd $(dirname "$path") && pwd -P)
filepath="${canonical_path}/${filename}"
ln -sf "$filepath" "${install_dir}/${filename}"