Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 52da880

Browse files
committed
Merge pull request #2896 from jbalsas/fix-2895
Add check for broken symlinks to hacking scripts (#2895)
2 parents b11394a + c0b8eb2 commit 52da880

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/restore_installed_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ ! -d "${1}" ]; then
1515
exit;
1616
fi
1717

18-
if [ -d "${1}/Contents/dev" ]; then
18+
if [[ -d "${1}/Contents/dev" || -n $(find -L "${1}/Contents/dev" -type l) ]]; then
1919
rm "${1}/Contents/dev"
2020
echo "$1 has been restored to the installed configuration."
2121
fi

tools/setup_for_hacking.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi;
2626
root_dir=${full_path%/*/*}
2727

2828
# Remove existing "dev" symlink, if present
29-
if [ -d "${1}/Contents/dev" ]; then
29+
if [[ -d "${1}/Contents/dev" || -n $(find -L "${1}/Contents/dev" -type l) ]]; then
3030
rm "${1}/Contents/dev"
3131
fi
3232

0 commit comments

Comments
 (0)