Skip to content

Commit b87167a

Browse files
try -f and realpath
1 parent eab21b0 commit b87167a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ for c in $CONNECTORS; do
9292
rmdir "$DIR"
9393
ln -rs "pinouts/$DIRECTORY" "$DIR"
9494
# If temp dir is a link, but not to the specified directory
95-
elif TARGET=$(readlink "$DIR") && [ "$TARGET" != "$(readlink "pinouts/$DIRECTORY")" ]; then
95+
elif TARGET=$(readlink -f "$DIR") && [ "$TARGET" != "$(realpath "pinouts/$DIRECTORY")" ]; then
9696
if [ "$DEBUG" = "true" ]; then
97-
echo "Found Directory is link to another directory: $TARGET vs $(readlink "pinouts/$DIRECTORY")"
97+
echo "Found Directory is link to another directory: $TARGET vs $(realpath "pinouts/$DIRECTORY")"
9898
fi
9999
# Make specified directory
100100
mkdir -p "pinouts/$DIRECTORY"

0 commit comments

Comments
 (0)