summaryrefslogtreecommitdiff
path: root/examples/extract.sh
diff options
context:
space:
mode:
authorGMT 1998 Tony Gale <gale@gtk.org>1998-12-07 15:19:00 +0000
committerTony Gale <gale@src.gnome.org>1998-12-07 15:19:00 +0000
commit337bdee253125b60eb38cab7e1d4916e8dd66d4f (patch)
tree4f4c6f771a02135a6796bd71c099059546e7f4d6 /examples/extract.sh
parent621beb8aaf93c8cfe234723d7001e114ac5a8345 (diff)
downloadgdk-pixbuf-337bdee253125b60eb38cab7e1d4916e8dd66d4f.tar.gz
Start mass update for GTK 1.1 Look for the best version of awk Fix FD leak
Mon Dec 7 15:15:06 GMT 1998 Tony Gale <gale@gtk.org> * docs/gtk_tut.sgml: Start mass update for GTK 1.1 * examples/extract.sh: Look for the best version of awk * examples/extract.awk: Fix FD leak * example/base: minimal example from Tutorial
Diffstat (limited to 'examples/extract.sh')
-rwxr-xr-xexamples/extract.sh28
1 files changed, 27 insertions, 1 deletions
diff --git a/examples/extract.sh b/examples/extract.sh
index b19e19a20..49be11318 100755
--- a/examples/extract.sh
+++ b/examples/extract.sh
@@ -1,2 +1,28 @@
#! /bin/sh
-awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
+# extract - extract C source files from GTK Tutorial
+# Copyright (C) Tony Gale 1998
+# Contact: gale@gtk.org
+#
+# extract.awk command Switches:
+# -c : Just do checking rather than output files
+# -f <filename> : Extract a specific file
+# -d : Extract files to current directory
+
+if [ -x /usr/bin/gawk ]; then
+ gawk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
+else
+ if [ -x /usr/bin/nawk ]; then
+ nawk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
+ else
+ if [ -x /usr/bin/awk ]; then
+ awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
+ else
+ if [ -x /bin/awk ]; then
+ awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5
+ else
+ echo "Can't find awk... please edit extract.sh by hand"
+ fi
+ fi
+ fi
+fi
+