Created
August 5, 2020 15:22
-
-
Save danielecook/08632a82804a5af919e23fe479168d7b to your computer and use it in GitHub Desktop.
Resolve symbolic link #bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolve-symbolic-link() { | |
if [ -L $1 ]; then | |
temp="$(readlink "$1")"; | |
rm -rf "$1"; | |
cp -rf "$temp" "$1"; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment