Created
July 2, 2013 19:14
-
-
Save dak180/5912200 to your computer and use it in GitHub Desktop.
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/bash -ev | |
# Add symlinks to recreate previous naming of executables in %p/bin | |
# as well as %p/lib/gcc4.8/bin and new -fsf-4.8 naming in %p/bin. | |
binfiles="gfortran gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic jcf-dump jv-convert jv-scan" | |
function lunker { | |
local TARGETFILE="${1}" | |
local XCRUNTAGET="${2}" | |
if [[ -z "${XCRUNTAGET}" ]]; then | |
local XCRUNTAGET="${TARGETFILE}" | |
fi | |
cat > "${TARGETFILE}" << EOF | |
#!/bin/bash | |
exec xcrun ${XCRUNTAGET} | |
EOF | |
chmod ugo+x "${TARGETFILE}" | |
} | |
for binfile in ${binfiles}; do | |
lunker "inst/lib/gcc4.8/bin/${binfile}" "lib/gcc4.8/bin/${binfile}-fsf-4.8" | |
lunker "inst/bin/${binfile}" "lib/gcc4.8/bin/${binfile}-fsf-4.8" | |
lunker "inst/bin/${binfile}-fsf-4.8" "lib/gcc4.8/bin/${binfile}-fsf-4.8" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment