X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=misc%2Fgen_edit.sh;h=dadf003571145b913096bc9b698e00505b3d8855;hp=e9b339010c9a3336d2f6d189d41517b88314a50b;hb=f44733b760290aa8f51c6c9e1e463254833bffcd;hpb=3c19a91c36092255fbac7de00e3db8830aefc053 diff --git a/misc/gen_edit.sh b/misc/gen_edit.sh index e9b33901..dadf0035 100755 --- a/misc/gen_edit.sh +++ b/misc/gen_edit.sh @@ -1,6 +1,7 @@ #!/bin/sh ############################################################################## -# Copyright (c) 2004,2011 Free Software Foundation, Inc. # +# Copyright 2020 Thomas E. Dickey # +# Copyright 2004-2011,2012 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -29,7 +30,7 @@ # # Author: Thomas E. Dickey # -# $Id: gen_edit.sh,v 1.2 2011/09/11 00:47:26 tom Exp $ +# $Id: gen_edit.sh,v 1.6 2020/02/02 23:34:34 tom Exp $ # Generate a sed-script for converting the terminfo.src to the form which will # be installed. # @@ -37,19 +38,24 @@ # The leaf directory names (lib, tabset, terminfo) # -: ${ticdir=@TERMINFO@} -: ${xterm_new=@WHICH_XTERM@} +linux_dft=linux2.2 + +: ${datadir=/usr/share} +: ${WHICH_LINUX=$linux_dft} +: ${WHICH_XTERM=xterm-new} +: ${XTERM_KBS=BS} # If we're not installing into /usr/share/, we'll have to adjust the location # of the tabset files in terminfo.src (which are in a parallel directory). -TABSET=`echo $ticdir | sed -e 's%/terminfo$%/tabset%'` +TABSET=${datadir}/tabset if test "x$TABSET" != "x/usr/share/tabset" ; then cat <&2 cat </dev/null` -if test "x$system" = xLinux -then - case x`uname -r` in - x1.*) +if test "$XTERM_KBS" != "BS" ; then +echo "** using DEL for XTerm backspace-key" >&2 cat </dev/null` + if test "x$system" = xLinux + then + case x`uname -r` in + x1.*) + WHICH_LINUX=linux-c + ;; + x2.[0-4]*) + WHICH_LINUX=linux2.2 + ;; + *) + WHICH_LINUX=linux3.0 + ;; + esac + else + WHICH_LINUX=$linux_dft + fi + ;; +xlinux*) + # allow specific setting + ;; +*) + WHICH_LINUX=$linux_dft + ;; +esac + +if test $WHICH_LINUX != $linux_dft +then +echo "** using $WHICH_LINUX terminal description for Linux console" >&2 cat <