when making links, if the link already exists as a directory, remove the directory first

This commit is contained in:
Andrew Tonner 2017-01-22 15:07:47 -08:00
parent 4715db8f28
commit cc0c168685
1 changed files with 4 additions and 3 deletions

View File

@ -99,7 +99,8 @@ links:
echo $$i; o=$$i; \
case $$i in *codegen_x86.h) o=kpx_cpu/src/cpu/jit/x86/codegen_x86.h;; esac; \
SUB=`echo $$o | sed 's;[^/]*/;../;g' | sed 's;[^/]*$$;;'` ;\
ln -sf "$$PREFIX$$SUB$(B2_TOPDIR)/src/$$i" src/$$o; \
cur_link=src/$$o ;\
if [ -d "$$cur_link" ]; then rm -rf "$$cur_link"; fi ;\
ln -sf "$$PREFIX$$SUB$(B2_TOPDIR)/src/$$i" $$cur_link; \
fi; \
done; \
ln -sf ../../../../../SheepShaver/src/Unix/config.h $(B2_TOPDIR)/src/Unix/Linux/NetDriver/config.h
done;