Files
proxmox-packer/common.sh
2023-11-21 20:27:31 -06:00

10 lines
145 B
Bash

follow_link() {
FILE="$1"
while [ -h "$FILE" ]; do
# On macOS, readlink -f doesn't work.
FILE="$(readlink "$FILE")"
done
echo "$FILE"
}