Skip to content

Commit

Permalink
Fix readlink for macOS
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Feb 7, 2024
1 parent 63de5ae commit 154806b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/ocr-validate.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Default to the parent dir of this script. Overwritten by `make install`
SHAREDIR="$(readlink -f "$(dirname "$(readlink -f "$0")")/..")"
SHAREDIR="$(readlink "$(dirname "$(readlink "$0")")/..")"
source "$SHAREDIR/lib.sh"

#{{{ show_usage ()
Expand Down Expand Up @@ -55,7 +55,7 @@ main () {
if [[ "$file" == "-" ]];then
((DEBUG > 1)) && loginfo "Reading from STDIN"
else
file=$(readlink -f "$file")
file=$(readlink "$file")
if [[ ! -e "$file" ]];then
show_usage "No such file: '$file'"
fi
Expand Down

0 comments on commit 154806b

Please sign in to comment.