#!/bin/sh # $Id: save-tin,v 1.4 1996/07/09 12:59:43 dickey Exp $ # # save the built-stuff from configuring & building tin, to make it simpler # to do rebuilds # SRC=`pwd` if test -d ../../save-tin then DST=../../save-tin else DST=../save-tin fi THIS=$SRC THAT=`echo $THIS|sed -e s/tin//` if test "$THIS" = "$THAT" then echo '? cannot save '$SRC exit 1 fi for f in config.status include/autoconf.h src/Makefile do if test ! -f $f then echo '? nothing to save: '$f exit 1 fi done if test ! -d $DST then mkdir $DST fi cd $SRC Host=`egrep '^# on host .*:$' config.status | sed -e 's/# on host //' -e 's/://'` Comp=`egrep '^s%@CC@%.*%g' config.status | sed -e 's/s%@CC@%//' -e 's/%g//'` Libs=`egrep '^s%@LIBS@%.*%g' config.status | sed -e 's/s%@LIBS@%//' -e 's/%g//'` case "$Libs" in *ncurses*) Libs=ncurses;; *termcap*) Libs=termcap;; *termlib*) Libs=termlib;; *curses*) Libs=curses;; *) Libs=unknown;; esac OUT=${Host}-${Comp}-${Libs} rm -f $DST/$OUT echo Creating ${OUT}: chmod u+wx $DST rm -f $DST/${OUT}.tgz rm -rf $DST/$OUT mkdir $DST/$OUT tar cvf - config.status config.cache *.out *.log */*.out */*.log include/autoconf.h src/Makefile src/LINT |(cd $DST/$OUT; tar xf -) cd $DST archive $OUT chmod -w .