@@ -41,8 +41,14 @@ export OBERON=".:$DIR/../../src:$OFRDIR/Lib/Sym"
OFR="ofront+ -s -88 -7w"
-$OFR $2 $FNAME
+$OFR $2 "$FNAME"
retcode=$?
+echo "AA=[$THISOS], BB=[$2]" >> /tmp/b
+if [[ "$THISOS" == "macOS" && "$2" == "-m" ]]; then
+ CFILE="$(basename "${FNAME/.Mod/}").c"
+ "$DIR/patch.sh" "$CFILE"
+fi
+
cd ..
exit $retcode
@@ -5,7 +5,7 @@
TARGET_FILE="$1"
TEMP_FILE="temp_${TARGET_FILE}"
-if [ ! -f "$TARGET_FILE" ]; then
+if [[ ! -f "$TARGET_FILE" ]]; then
echo "File $TARGET_FILE not found!"
exit 1
fi
@@ -77,7 +77,7 @@ $OFR -Cwm FreeOberon.Mod &&
$OFR -7wm Fob.Mod &&
-{ [ "$THISOS" = "macOS" ] && ../Data/bin/patch.sh FreeOberon.c || true; } &&
+{ [[ "$THISOS" == "macOS" ]] && ../Data/bin/patch.sh FreeOberon.c || true; } &&
$CCFULL -c Utf8.c &&