Browse files

Fix runpython.do for systems with unxpected configurations.

If the expected arch directory doesn't exist, give up and don't specify arch at
all. Currently it expands to '*' which fails.

[slightly modified by apenwarr]
  • Loading branch information...
1 parent e737f4b commit 12f6a52ec61203302a8f57a6f1b2b60ac2c083ad @drheld drheld committed with Feb 2, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 ui-macos/bits/runpython.do
View
14 ui-macos/bits/runpython.do
@@ -2,12 +2,14 @@ exec >&2
redo-ifchange runpython.c
ARCHES=""
printf "Platforms: "
-for d in /usr/libexec/gcc/darwin/*; do
- PLAT=$(basename "$d")
- [ "$PLAT" != "ppc64" ] || continue # fails for some reason on my Mac
- ARCHES="$ARCHES -arch $PLAT"
- printf "$PLAT "
-done
+if [ -d /usr/libexec/gcc/darwin ]; then
+ for d in /usr/libexec/gcc/darwin/*; do
+ PLAT=$(basename "$d")
+ [ "$PLAT" != "ppc64" ] || continue # fails for some reason on my Mac
+ ARCHES="$ARCHES -arch $PLAT"
+ printf "$PLAT "
+ done
+fi
printf "\n"
gcc $ARCHES \
-Wall -o $3 runpython.c \

0 comments on commit 12f6a52

Please sign in to comment.