๐Ÿ“ฆโž”๐Ÿฆ‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

[#5] handle realpath command in macOS

Ducky 4bb6dc81 1a67efe2

+13 -3
+13 -3
atfile.sh
··· 499 499 esac 500 500 } 501 501 502 + function atfile.util.get_realpath() { 503 + path="$1" 504 + 505 + if [[ $(atfile.util.get_os) == "macos" ]]; then 506 + realpath "$path" 507 + else 508 + realpath -s "$path" 509 + fi 510 + } 511 + 502 512 function atfile.util.get_rkey_from_at_uri() { 503 513 at_uri="$1" 504 514 echo $at_uri | cut -d "/" -f 5 ··· 2083 2093 2084 2094 ## Global variables 2085 2095 2086 - _prog="$(basename "$(realpath -s "$0")")" 2087 - _prog_dir="$(dirname "$(realpath -s "$0")")" 2088 - _prog_path="$(realpath -s "$0")" 2096 + _prog="$(basename "$(atfile.util.get_realpath "$0")")" 2097 + _prog_dir="$(dirname "$atfile.util.get_realpath "$0")")" 2098 + _prog_path="$(atfile.util.get_realpath "$0")" 2089 2099 _version="0.4.5" 2090 2100 _c_author="Ducky" 2091 2101 _c_year="2024"