1998-06-04 11:15:55 +00:00
|
|
|
#! /bin/sh
|
1998-12-07 15:19:00 +00:00
|
|
|
# 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
|
2002-02-14 22:49:57 +00:00
|
|
|
|
|
|
|
TUTORIAL=../docs/tutorial/gtk-tut.sgml
|
|
|
|
|
1998-12-07 15:19:00 +00:00
|
|
|
if [ -x /usr/bin/gawk ]; then
|
2002-02-14 22:49:57 +00:00
|
|
|
gawk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
|
1998-12-07 15:19:00 +00:00
|
|
|
else
|
|
|
|
if [ -x /usr/bin/nawk ]; then
|
2002-02-14 22:49:57 +00:00
|
|
|
nawk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
|
1998-12-07 15:19:00 +00:00
|
|
|
else
|
|
|
|
if [ -x /usr/bin/awk ]; then
|
2002-02-14 22:49:57 +00:00
|
|
|
awk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
|
1998-12-07 15:19:00 +00:00
|
|
|
else
|
|
|
|
if [ -x /bin/awk ]; then
|
2002-02-14 22:49:57 +00:00
|
|
|
awk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
|
1998-12-07 15:19:00 +00:00
|
|
|
else
|
|
|
|
echo "Can't find awk... please edit extract.sh by hand"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|