2
# WARNING -- first line intentionally left blank for sh/csh/ksh
3
# compatibility. Do not remove it! FNF, UniSoft Systems.
8
# The file <to> is replaced with the file <from>, after first
9
# moving <to> to a backup file. The backup file name is created
10
# by prepending the filename (after removing any leading pathname
11
# components) with "OLD".
13
# This script is currently not real robust in the face of signals
14
# or permission problems. It also does not do (by intention) all
15
# the things that the System V or BSD install scripts try to do
20
echo "usage: $0 <from> <to>"
24
# Now extract the dirname and basename components. Unfortunately, BSD does
25
# not have dirname, so we do it the hard way.
27
fd=`expr $1'/' : '\(/\)[^/]*/$' \| $1'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \| .`
29
td=`expr $2'/' : '\(/\)[^/]*/$' \| $2'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \| .`
32
# Now test to make sure that they are not the same files.
34
if [ $fd/$ff = $td/$tf ]
36
echo "install: input and output are same files"
40
# Save a copy of the "to" file as a backup.
55
# Now do the copy and return appropriate status