summaryrefslogtreecommitdiff
path: root/test/jarebug.sh
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-05-20 21:03:52 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-05-20 21:03:52 +0300
commitf8ec28a30e98cad325d18478a3d054b8c30a3129 (patch)
treeb50f08a79d4bf32c8fcb3cd2d749f0a1b6691192 /test/jarebug.sh
parentac950a04867fce7784680ba76d654d910e88a8cd (diff)
downloadgawk-f8ec28a30e98cad325d18478a3d054b8c30a3129.tar.gz
Enhance jarebug for Mac OS X.
Diffstat (limited to 'test/jarebug.sh')
-rwxr-xr-xtest/jarebug.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/jarebug.sh b/test/jarebug.sh
new file mode 100755
index 00000000..dcc73e6c
--- /dev/null
+++ b/test/jarebug.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+awk=$1
+prog=$2
+infile=$3
+out=$4
+
+# GLIBC gives us ja_JP.EUC-JP but Mac OS X uses ja_JP.eucJP
+
+cp $infile $out # set up default
+
+for locale in ja_JP.EUC-JP ja_JP.eucJP
+do
+ if locale -a | grep $locale > /dev/null
+ then
+ LANG=$locale
+ LC_ALL=$locale
+ export LANG LC_ALL
+ $awk -f $prog $infile >$out 2>&1 || echo EXIT CODE: $? >> $out
+ fi
+done