Clarification about Nelua shell script please... #221
-
If we open #!/bin/sh
# implement realpath case it's not present (Mac OS X for example)
if ! [ -x "$(command -v realpath)" ]; then
realpath() {
OURPWD=$PWD
cd "$(dirname "$1")"
LINK=$(readlink "$(basename "$1")")
while [ "$LINK" ]; do
cd "$(dirname "$LINK")"
LINK=$(readlink "$(basename "$1")")
done
REALPATH="$PWD/$(basename "$1")"
cd "$OURPWD"
echo "$REALPATH"
}
fi
# detect the current directory for this script
SCRIPT=$(realpath "$0")
SCRIPT_DIR=$(dirname "$SCRIPT")
NELUA_LUA=$SCRIPT_DIR/nelua-lua
# execute nelua compiler
exec "$SCRIPT_DIR/nelua-lua" -lnelua nelua.lua "$@" My question @edubart is: isn't Do they differ somehow? |
Beta Was this translation helpful? Give feedback.
Answered by
edubart
Jul 2, 2023
Replies: 1 comment 1 reply
-
They are the same thing, simplified in 7b3f4b9 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
edubart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
They are the same thing, simplified in 7b3f4b9