stac

simple static site generator
git clone git://git.kocotian.pl/stacinhtml.git
Log | Files | Refs | README | LICENSE

stac (428B)


      1 #!/bin/sh
      2 
      3 CC="gcc"
      4 
      5 while true; do
      6 	case $1 in
      7 		-CC)
      8 			CC="$2"
      9 			shift 2
     10 			;;
     11 		-CFLAGS)
     12 			CFLAGS="$2"
     13 			shift 2
     14 			;;
     15 		*)
     16 			break
     17 			;;
     18 	esac
     19 done
     20 
     21 make generator > /dev/null || exit 1
     22 
     23 ./compile $@ > /tmp/stac.$$.c || exit 1
     24 
     25 ${CC} /tmp/stac.$$.c -o /tmp/stac.$$ -Iinclude -I. \
     26 	${CFLAGS} \
     27 	util.o assemble.o str.o libstac/libstac.o || {
     28 	rm /tmp/stac.$$.c
     29 	exit 1
     30 }
     31 rm /tmp/stac.$$.c
     32 
     33 /tmp/stac.$$
     34 rm /tmp/stac.$$