Created
September 28, 2023 09:44
-
-
Save LeeCheneler/79a899ac9099408ac0d0716ba406ca65 to your computer and use it in GitHub Desktop.
replace symlinks
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
#!/bin/sh | |
# Script to replace symlinked files with real files | |
# usage: ./replace-symlinks.sh my/folder | |
directory=$1 | |
parent_directory=$(dirname $directory) | |
temp_directory=$parent_directory/__temp | |
cp -L -r $directory $temp_directory | |
rm -rf $directory | |
cp -r $temp_directory $directory | |
rm -rf $temp_directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment