diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/indent.sh | 3 | ||||
| -rwxr-xr-x | scripts/install-lss.sh | 38 |
2 files changed, 41 insertions, 0 deletions
diff --git a/scripts/indent.sh b/scripts/indent.sh index 3f33bb8a..899870de 100755 --- a/scripts/indent.sh +++ b/scripts/indent.sh @@ -1,4 +1,5 @@ #!/bin/sh +# $LynxId: indent.sh,v 1.3 2007/05/13 16:26:51 tom Exp $ # Indent LYNX files. NOOP=no OPTS=' @@ -112,12 +113,14 @@ do -e '/MODULE_ID(/s/)$/);/' \ -e 's,)[ ]*\<GCC_PRINTFLIKE,);//GCC_PRINTFLIKE,' \ -e 's,[ ]*\<GCC_NORETURN;,;//GCC_NORETURN;,' \ + -e 's,[ ]*\<GCC_UNUSED;,;//GCC_UNUSED;,' \ "$save" >"$test" cp "$test" "$name" chmod u+w "$name" ${INDENT_PROG-indent} -npro $OPTS "$name" sed \ -e '/MODULE_ID(/s/);$/)/' \ + -e 's,;[ ]*//GCC_UNUSED;, GCC_UNUSED;,' \ -e 's,;[ ]*//GCC_NORETURN;, GCC_NORETURN;,' \ -e 's,);[ ]*//GCC_PRINTFLIKE,) GCC_PRINTFLIKE,' \ "$name" >"$test" diff --git a/scripts/install-lss.sh b/scripts/install-lss.sh new file mode 100755 index 00000000..6573a35e --- /dev/null +++ b/scripts/install-lss.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# $LynxId: install-lss.sh,v 1.1 2007/05/13 22:15:29 tom Exp $ +# install lynx.lss, ensuring the old config-file is saved to a backup file. +# +# $1 = install program +# $2 = file to install +# $3 = where to install it +PRG="$1" +SRC=$2 +DST=$3 + +if test -f "$DST" ; then + # See if we have saved this information before + if cmp -s $SRC $DST + then + echo "... installed $DST would not be changed" + else + NUM=1 + while test -f ${DST}-${NUM} + do + if cmp -s $SRC ${DST}-${NUM} + then + break + fi + NUM=`expr $NUM + 1` + done + if test ! -f ${DST}-${NUM} + then + echo "... saving old config as ${DST}-${NUM}" + mv $DST ${DST}-${NUM} || exit 1 + fi + echo "** installing $SRC as $DST" + eval $PRG $SRC $DST || exit 1 + fi +else + echo "** installing $SRC as $DST" + eval $PRG $SRC $DST || exit 1 +fi |