mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Utility script to install a header file, only if the modified date
has changed.
This commit is contained in:
@@ -5,3 +5,5 @@ validate
|
||||
csvdiff
|
||||
*.ilk
|
||||
*.pdb
|
||||
cti2ctml
|
||||
install_tsc
|
||||
|
||||
34
bin/install_tsc.in
Executable file
34
bin/install_tsc.in
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install_ts source DEST_DIR'
|
||||
#
|
||||
# Install a file checking the time step first
|
||||
#
|
||||
if test $# -ne 2 ; then
|
||||
echo 'install_ts ERROR: This program requires 2 and only 2 parameters:'
|
||||
echo ' install_ts source DEST_DIR'
|
||||
exit -1
|
||||
fi
|
||||
lh=$1
|
||||
INCDIR=$2
|
||||
th=$(INCDIR)/"$${lh}" ;
|
||||
if test ! -f "${lh}" ; then
|
||||
echo 'install_ts ERROR: the file, ' ${lh} ', does not exist'
|
||||
exit -1
|
||||
fi
|
||||
if test ! -f "${th}" ; then
|
||||
if test -x "${lh}" ; then
|
||||
@INSTALL@ -m 755 -v "${lh}" "${th}"
|
||||
else
|
||||
@INSTALL@ -m 644 -v "${lh}" "${th}"
|
||||
fi
|
||||
else
|
||||
if test "${lh}" -nt "${th}" ; then
|
||||
if test -x "${lh}" ; then
|
||||
@INSTALL@ -m 755 -v "${lh}" "${th}"
|
||||
else
|
||||
@INSTALL@ -m 644 -v "${lh}" "${th}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
Reference in New Issue
Block a user