]> Pileus Git - ~andy/gtk/blob - examples/extract.sh
2.13.6
[~andy/gtk] / examples / extract.sh
1 #! /bin/sh
2 # extract - extract C source files from GTK Tutorial
3 # Copyright (C) Tony Gale 1998
4 # Contact: gale@gtk.org
5 #
6 # extract.awk command Switches:
7 # -c : Just do checking rather than output files
8 # -f <filename> : Extract a specific file
9 # -d : Extract files to current directory
10
11 TUTORIAL=../docs/tutorial/gtk-tut.sgml
12
13 if [ -x /usr/bin/gawk ]; then
14  gawk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
15 else
16  if [ -x /usr/bin/nawk ]; then
17   nawk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
18  else
19   if [ -x /usr/bin/awk ]; then
20    awk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
21   else 
22    if [ -x /bin/awk ]; then
23     awk -f extract.awk $TUTORIAL $1 $2 $3 $4 $5
24    else
25     echo "Can't find awk... please edit extract.sh by hand"
26    fi
27   fi
28  fi
29 fi
30