Files
CRM/scripts/realpath.sh
Kroonk a213a1dba0
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
refactor: replace custom CRM with Monica fork
2026-05-22 16:19:55 +02:00

17 lines
271 B
Bash

realpath ()
{
f=$@;
if [ -z "$f" ]; then
f=$(pwd)
fi
if [ -d "$f" ]; then
base="";
dir="$f";
else
base="/$(basename "$f")";
dir=$(dirname "$f");
fi;
dir=$(cd "$dir" && /bin/pwd -P);
echo "$dir$base"
}