pleroma_ctl: Use realpath(1) instead of readlink(1)

From realpath(1) in POSIX 202x Draft 4.1:
> If file does not name a symbolic link, readlink shall write a diagnostic
> message to standard error and exit with non-zero status.

Which also doesn't includes `-f`, in preference of `realpath`.
This commit is contained in:
Haelwenn (lanodan) Monnier 2024-05-23 00:35:38 +02:00
parent 05b9805bf9
commit 818712f99f
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View file

@ -0,0 +1 @@
pleroma_ctl: Use realpath(1) instead of readlink(1)

View file

@ -134,7 +134,7 @@ if [ -z "$1" ] || [ "$1" = "help" ]; then
"
else
SCRIPT=$(readlink -f "$0")
SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
FULL_ARGS="$*"