Browse Source

s/realpath/readlink -f/g

jrb0001 2 years ago
parent
commit
96a58dffdd
4 changed files with 4 additions and 4 deletions
  1. 1 1
      check-my-stuff
  2. 1 1
      check-pol
  3. 1 1
      fmt-my-stuff
  4. 1 1
      install-commit-hook

+ 1 - 1
check-my-stuff

@@ -6,7 +6,7 @@ if [ "$#" -eq "0" ]
     exit
 fi
 
-BASE="$(realpath "$0")"
+BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
 BASE="$(dirname "$BASE")"
 cd "$BASE" || exit 1
 

+ 1 - 1
check-pol

@@ -7,7 +7,7 @@ if [ $# -eq 0 ]
     exit
 fi
 
-BASE="$(realpath "$0")"
+BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
 BASE="$(dirname "$BASE")"
 cd "$BASE" || exit 1
 

+ 1 - 1
fmt-my-stuff

@@ -6,7 +6,7 @@ if [ "$#" -eq "0" ]
     exit
 fi
 
-BASE="$(realpath "$0")"
+BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
 BASE="$(dirname "$BASE")"
 
 grep -lr $1 $BASE/data/ | while read line; do utils/schema-check/dn42-schema.py fmt -i $line; done

+ 1 - 1
install-commit-hook

@@ -6,7 +6,7 @@ if [ $# -eq 0 ]
     exit
 fi
 
-BASE="$(realpath "$0")"
+BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
 BASE="$(dirname "$BASE")"
 cd "$BASE" || exit 1