]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - misc/run_tic.in
ncurses 6.4 - patch 20240420
[ncurses.git] / misc / run_tic.in
index ef2e26518726ea0cf3be5960424a07a580613ab6..bd11c4c80d4c4bbed0aa40ed2283d589b5e6d8c8 100644 (file)
@@ -1,7 +1,8 @@
 #!@SHELL@
-# $Id: run_tic.in,v 1.35 2017/10/24 00:16:22 tom Exp $
+# $Id: run_tic.in,v 1.40 2022/07/16 19:37:03 tom Exp $
 ##############################################################################
-# Copyright (c) 1998-2012,2017 Free Software Foundation, Inc.                #
+# Copyright 2019-2020,2022 Thomas E. Dickey                                  #
+# Copyright 2000-2012,2017 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"), #
@@ -41,21 +42,20 @@ echo "** Building terminfo database, please wait..."
 # The script is designed to be run from the misc/Makefile as
 #      make install.data
 
-: ${suffix:=@EXEEXT@}
-: ${DESTDIR:=@DESTDIR@}
-: ${prefix:=@prefix@}
-: ${exec_prefix:=@exec_prefix@}
-: ${bindir:=@bindir@}
-: ${top_srcdir:=@top_srcdir@}
-: ${srcdir:=@srcdir@}
-: ${datarootdir:=@datarootdir@}
-: ${datadir:=@datadir@}
-: ${TIC_PATH:=@TIC_PATH@}
-: ${ticdir:=@TERMINFO@}
-: ${source:=@TERMINFO_SRC@}
-: ${LN_S:="@LN_S@"}
-: ${cross_compiling:=no}
-: ${ext_funcs:=@NCURSES_EXT_FUNCS@}
+: "${suffix:=@EXEEXT@}"
+: "${DESTDIR:=@DESTDIR@}"
+: "${prefix:=@prefix@}"
+: "${exec_prefix:=@exec_prefix@}"
+: "${bindir:=@bindir@}"
+: "${top_srcdir:=@top_srcdir@}"
+: "${srcdir:=@srcdir@}"
+: "${datarootdir:=@datarootdir@}"
+: "${datadir:=@datadir@}"
+: "${TIC_PATH:=@TIC@}"
+: "${ticdir:=@TERMINFO@}"
+: "${source:=@TERMINFO_SRC@}"
+: "${cross_compiling:=no}"
+: "${ext_funcs:=@NCURSES_EXT_FUNCS@}"
 
 test -z "${DESTDIR}" && DESTDIR=
 
@@ -117,7 +117,7 @@ TICDIR=`echo "$TERMINFO" | sed -e 's%/share/\([^/]*\)$%/lib/\1%'`
 PARENT=`echo "$TERMINFO" | sed -e 's%/[^/]*$%%'`
 if test -n "$PARENT"
 then
-       test -d $PARENT || mkdir -p $PARENT
+       mkdir -p "$PARENT"
 fi
 
 # Remove the old terminfo stuff; we don't care if it existed before, and it
@@ -126,7 +126,7 @@ fi
 # the directory is actually a symbolic link.
 if test -d "$TERMINFO"
 then
-       ( cd "$TERMINFO" && rm -fr ? 2>/dev/null )
+       ( cd "$TERMINFO" && rm -fr ./? 2>/dev/null )
 elif test -f "$TERMINFO.db"
 then
        ( rm -f "$TERMINFO.db" 2>/dev/null )
@@ -144,6 +144,7 @@ Running $TIC_PATH to install $TERMINFO ...
        document, and install the terminfo without the -x option.
 
 EOF
+$TIC_PATH -V
 if ( $TIC_PATH -x -s -o "$TERMINFO" $source )
 then
        echo "** built new $TERMINFO"
@@ -163,6 +164,7 @@ Running $TIC_PATH to install $TERMINFO ...
        document, and install the terminfo without the -x option.
 
 EOF
+$TIC_PATH -V
 if ( $TIC_PATH -s -o "$TERMINFO" $source )
 then
        echo "** built new $TERMINFO"
@@ -180,9 +182,9 @@ if test "$TICDIR" != "$TERMINFO" ; then
        ( rm -f "$TICDIR" 2>/dev/null )
        if ( cd "$TICDIR" 2>/dev/null )
        then
-               cd "$TICDIR"
+               cd "$TICDIR" || exit
                TICDIR=`pwd`
-               if test "$TICDIR "!= "$TERMINFO "; then
+               if test "$TICDIR " != "$TERMINFO "; then
                        # Well, we tried.  Some systems lie to us, so the
                        # installer will have to double-check.
                        echo "Verify if $TICDIR and $TERMINFO are the same."
@@ -190,7 +192,7 @@ if test "$TICDIR" != "$TERMINFO" ; then
                        echo "Otherwise, remove $TICDIR and link it to $TERMINFO."
                fi
        else
-               cd ${DESTDIR}$prefix
+               cd ${DESTDIR}$prefix || exit
                # Construct a symbolic link that only assumes $ticdir has the
                # same $prefix as the other installed directories.
                RELATIVE=`echo $ticdir|sed -e 's%^'$prefix'/%%'`