move orig/ to .orig

gcc looks for programs in a path relative to its executable's location..
This commit is contained in:
Joey Hess 2018-04-16 17:47:35 -04:00
parent f821b0e046
commit 0a74404c97
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -6,7 +6,7 @@
#
# Since the ghc-android wrappers actually hardcode the path to the
# toolchain, and we want to wrap the toolchain programs, the binaries
# are moved to bin/orig/ and replaced by wrappers.
# are moved to .orig and replaced by wrappers.
androidversion="$1"
@ -25,11 +25,9 @@ wrap () {
# location to toolchain as installed by ghc-android
androidtoolchain="$HOME/.ghc/$(cat $top/abiversion)/bin"
mkdir -p "$androidtoolchain/orig"
for f in $(find "$androidtoolchain" -maxdepth 1 -not -type d -printf '%f\n'); do
for f in $(find "$androidtoolchain" -maxdepth 1 -not -type d -printf '%f\n' | grep -v \.orig); do
bin="$androidtoolchain/$f"
orig="$androidtoolchain/orig/$f"
orig="$androidtoolchain/$f.orig"
if [ ! -e "$orig" ]; then
cp -a "$bin" "$orig"
fi