#!/bin/sh # $Id: save-lynx,v 1.3 1997/12/18 00:41:48 tom Exp $ # # save the built-stuff from configuring & building lynx, to make it simpler # to do rebuilds # SRC=`pwd` DST=../save-lynx #THIS=`basename $SRC` THIS=$SRC THAT=`echo $THIS|sed -e s/lynx//` if test "$THIS" = "$THAT" then echo '? cannot save '$SRC exit 1 fi for f in config.status lynx_cfg.h 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 . ./config.cache #Host=`egrep '^# on host .*:$' config.status | sed -e 's/# on host //' -e 's/://'` Host=`egrep '^s%@host_os@%.*%g' config.status | sed -e 's/s%@host_os@%//' -e 's/%g//' -e 's/ //g'` Comp=`egrep '^s%@CC@%.*%g' config.status | sed -e 's/s%@CC@%//' -e 's/%g//' -e 's/ //g'` Disp=$cf_cv_screen case ".$cf_cv_ncurses_version" in .[1-9]*) #(vi Disp="ncurses${cf_cv_ncurses_version}" ;; esac if ( egrep 'define[ ]+USE_COLOR_STYLE' lynx_cfg.h 2>&1 >/dev/null ) then Style=styled else Style=nostyle fi Opts=`egrep '^s%@CFLAGS@%.*g$' config.status | sed -e 's/^.*@%//' -e 's/-[IUD][^ ]*//g' -e 's/-W[a-z-]*//g' -e 's/-g//' -e 's/-O[0-9]*//' -e 's/ //g' -e 's/%g$//'` OUT=${Host}-${Comp}${Opts}-${Disp}-${Style} if [ -f main.o -a ! -f size.out ] then size *.o >size.out fi 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 lynx_cfg.h |(cd $DST/$OUT; tar xf -) cd $DST archive $OUT chmod -w .