mirror of
https://github.com/bgp/bgpq4.git
synced 2024-05-11 05:55:05 +00:00
install target and install script added..
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
CC=@CC@
|
CC=@CC@
|
||||||
CFLAGS=@CFLAGS@ @DEFS@ -g -Wall -I. -O0
|
CFLAGS=@CFLAGS@ @DEFS@ -g -Wall -I. -O0
|
||||||
LDADD=@LDFLAGS@ @LIBS@
|
LDADD=@LDFLAGS@ @LIBS@
|
||||||
|
INSTALL=@INSTALL@
|
||||||
|
|
||||||
OBJECTS=bgpq3.o sx_report.o bgpq_expander.o sx_slentry.o bgpq3_printer.o \
|
OBJECTS=bgpq3.o sx_report.o bgpq_expander.o sx_slentry.o bgpq3_printer.o \
|
||||||
sx_prefix.o strlcpy.o
|
sx_prefix.o strlcpy.o
|
||||||
@@ -20,5 +21,8 @@ clean:
|
|||||||
rm -rf Makefile autom4te.cache bgpq3 config.h config.log config.status
|
rm -rf Makefile autom4te.cache bgpq3 config.h config.log config.status
|
||||||
rm -rf *.o *.core core.* core
|
rm -rf *.o *.core core.* core
|
||||||
|
|
||||||
|
install: bgpq3
|
||||||
|
${INSTALL} -c -s -m 755 bgpq3 @prefix@@bindir@
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend -- $(CFLAGS) -- $(SRCS)
|
makedepend -- $(CFLAGS) -- $(SRCS)
|
||||||
|
115
configure
vendored
115
configure
vendored
@@ -273,7 +273,7 @@ PACKAGE_VERSION='0.1.3'
|
|||||||
PACKAGE_STRING='bgpq3 0.1.3'
|
PACKAGE_STRING='bgpq3 0.1.3'
|
||||||
PACKAGE_BUGREPORT='snar@paranoia.ru'
|
PACKAGE_BUGREPORT='snar@paranoia.ru'
|
||||||
|
|
||||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LIBOBJS LTLIBOBJS'
|
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LIBOBJS LTLIBOBJS'
|
||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
@@ -2188,6 +2188,110 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|||||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
ac_aux_dir=
|
||||||
|
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
|
||||||
|
if test -f $ac_dir/install-sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install-sh -c"
|
||||||
|
break
|
||||||
|
elif test -f $ac_dir/install.sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install.sh -c"
|
||||||
|
break
|
||||||
|
elif test -f $ac_dir/shtool; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/shtool install -c"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$ac_aux_dir"; then
|
||||||
|
{ { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
|
||||||
|
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
|
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
|
||||||
|
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
|
||||||
|
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
|
||||||
|
|
||||||
|
# Find a good install program. We prefer a C program (faster),
|
||||||
|
# so one script is as good as another. But avoid the broken or
|
||||||
|
# incompatible versions:
|
||||||
|
# SysV /etc/install, /usr/sbin/install
|
||||||
|
# SunOS /usr/etc/install
|
||||||
|
# IRIX /sbin/install
|
||||||
|
# AIX /bin/install
|
||||||
|
# AmigaOS /C/install, which installs bootblocks on floppy discs
|
||||||
|
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
|
||||||
|
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
|
||||||
|
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||||
|
# OS/2's system install, which has a completely different semantic
|
||||||
|
# ./install, which can be erroneously created by make from ./install.sh.
|
||||||
|
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
|
||||||
|
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
|
||||||
|
if test -z "$INSTALL"; then
|
||||||
|
if test "${ac_cv_path_install+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
test -z "$as_dir" && as_dir=.
|
||||||
|
# Account for people who put trailing slashes in PATH elements.
|
||||||
|
case $as_dir/ in
|
||||||
|
./ | .// | /cC/* | \
|
||||||
|
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
|
||||||
|
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
|
||||||
|
/usr/ucb/* ) ;;
|
||||||
|
*)
|
||||||
|
# OSF1 and SCO ODT 3.0 have their own names for install.
|
||||||
|
# Don't use installbsd from OSF since it installs stuff as root
|
||||||
|
# by default.
|
||||||
|
for ac_prog in ginstall scoinst install; do
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
|
||||||
|
if test $ac_prog = install &&
|
||||||
|
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
|
||||||
|
# AIX install. It has an incompatible calling convention.
|
||||||
|
:
|
||||||
|
elif test $ac_prog = install &&
|
||||||
|
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
|
||||||
|
# program-specific install script used by HP pwplus--don't use.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
|
||||||
|
break 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test "${ac_cv_path_install+set}" = set; then
|
||||||
|
INSTALL=$ac_cv_path_install
|
||||||
|
else
|
||||||
|
# As a last resort, use the slow shell script. We don't cache a
|
||||||
|
# path for INSTALL within a source directory, because that will
|
||||||
|
# break other packages using the cache if that directory is
|
||||||
|
# removed, or if the path is relative.
|
||||||
|
INSTALL=$ac_install_sh
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $INSTALL" >&5
|
||||||
|
echo "${ECHO_T}$INSTALL" >&6
|
||||||
|
|
||||||
|
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
|
||||||
|
# It thinks the first close brace ends the variable substitution.
|
||||||
|
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
||||||
|
|
||||||
|
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
|
||||||
|
|
||||||
|
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2873,6 +2977,7 @@ Copyright (C) 2003 Free Software Foundation, Inc.
|
|||||||
This config.status script is free software; the Free Software Foundation
|
This config.status script is free software; the Free Software Foundation
|
||||||
gives unlimited permission to copy, distribute and modify it."
|
gives unlimited permission to copy, distribute and modify it."
|
||||||
srcdir=$srcdir
|
srcdir=$srcdir
|
||||||
|
INSTALL="$INSTALL"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||||
@@ -3060,6 +3165,9 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
|
|||||||
s,@ac_ct_CC@,$ac_ct_CC,;t t
|
s,@ac_ct_CC@,$ac_ct_CC,;t t
|
||||||
s,@EXEEXT@,$EXEEXT,;t t
|
s,@EXEEXT@,$EXEEXT,;t t
|
||||||
s,@OBJEXT@,$OBJEXT,;t t
|
s,@OBJEXT@,$OBJEXT,;t t
|
||||||
|
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
|
||||||
|
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
|
||||||
|
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
|
||||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||||
CEOF
|
CEOF
|
||||||
@@ -3223,6 +3331,10 @@ case $ac_abs_builddir in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
case $INSTALL in
|
||||||
|
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
|
||||||
|
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test x"$ac_file" != x-; then
|
if test x"$ac_file" != x-; then
|
||||||
{ echo "$as_me:$LINENO: creating $ac_file" >&5
|
{ echo "$as_me:$LINENO: creating $ac_file" >&5
|
||||||
@@ -3284,6 +3396,7 @@ s,@builddir@,$ac_builddir,;t t
|
|||||||
s,@abs_builddir@,$ac_abs_builddir,;t t
|
s,@abs_builddir@,$ac_abs_builddir,;t t
|
||||||
s,@top_builddir@,$ac_top_builddir,;t t
|
s,@top_builddir@,$ac_top_builddir,;t t
|
||||||
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
|
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
|
||||||
|
s,@INSTALL@,$ac_INSTALL,;t t
|
||||||
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
|
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
|
||||||
rm -f $tmp/stdin
|
rm -f $tmp/stdin
|
||||||
if test x"$ac_file" != x-; then
|
if test x"$ac_file" != x-; then
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
AC_INIT(bgpq3,0.1.3,snar@paranoia.ru)
|
AC_INIT(bgpq3,0.1.3,snar@paranoia.ru)
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
AC_CHECK_FUNCS(strlcpy)
|
AC_CHECK_FUNCS(strlcpy)
|
||||||
|
|
||||||
|
251
install-sh
Executable file
251
install-sh
Executable file
@@ -0,0 +1,251 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||||
|
#
|
||||||
|
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
# documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
# the above copyright notice appear in all copies and that both that
|
||||||
|
# copyright notice and this permission notice appear in supporting
|
||||||
|
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||||
|
# publicity pertaining to distribution of the software without specific,
|
||||||
|
# written prior permission. M.I.T. makes no representations about the
|
||||||
|
# suitability of this software for any purpose. It is provided "as is"
|
||||||
|
# without express or implied warranty.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch. It can only install one file at a time, a restriction
|
||||||
|
# shared with many OS's install programs.
|
||||||
|
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
|
||||||
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
|
mvprog="${MVPROG-mv}"
|
||||||
|
cpprog="${CPPROG-cp}"
|
||||||
|
chmodprog="${CHMODPROG-chmod}"
|
||||||
|
chownprog="${CHOWNPROG-chown}"
|
||||||
|
chgrpprog="${CHGRPPROG-chgrp}"
|
||||||
|
stripprog="${STRIPPROG-strip}"
|
||||||
|
rmprog="${RMPROG-rm}"
|
||||||
|
mkdirprog="${MKDIRPROG-mkdir}"
|
||||||
|
|
||||||
|
transformbasename=""
|
||||||
|
transform_arg=""
|
||||||
|
instcmd="$mvprog"
|
||||||
|
chmodcmd="$chmodprog 0755"
|
||||||
|
chowncmd=""
|
||||||
|
chgrpcmd=""
|
||||||
|
stripcmd=""
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
mvcmd="$mvprog"
|
||||||
|
src=""
|
||||||
|
dst=""
|
||||||
|
dir_arg=""
|
||||||
|
|
||||||
|
while [ x"$1" != x ]; do
|
||||||
|
case $1 in
|
||||||
|
-c) instcmd="$cpprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-d) dir_arg=true
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-m) chmodcmd="$chmodprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd="$stripprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
*) if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
src=$1
|
||||||
|
else
|
||||||
|
# this colon is to work around a 386BSD /bin/sh bug
|
||||||
|
:
|
||||||
|
dst=$1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no input file specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]; then
|
||||||
|
dst=$src
|
||||||
|
src=""
|
||||||
|
|
||||||
|
if [ -d $dst ]; then
|
||||||
|
instcmd=:
|
||||||
|
chmodcmd=""
|
||||||
|
else
|
||||||
|
instcmd=mkdir
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
|
if [ -f $src -o -d $src ]
|
||||||
|
then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
echo "install: $src does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dst" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no destination specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; if your system
|
||||||
|
# does not like double slashes in filenames, you may need to add some logic
|
||||||
|
|
||||||
|
if [ -d $dst ]
|
||||||
|
then
|
||||||
|
dst="$dst"/`basename $src`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
## this sed command emulates the dirname command
|
||||||
|
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||||
|
|
||||||
|
# Make sure that the destination directory exists.
|
||||||
|
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||||
|
|
||||||
|
# Skip lots of stat calls in the usual case.
|
||||||
|
if [ ! -d "$dstdir" ]; then
|
||||||
|
defaultIFS='
|
||||||
|
'
|
||||||
|
IFS="${IFS-${defaultIFS}}"
|
||||||
|
|
||||||
|
oIFS="${IFS}"
|
||||||
|
# Some sh's can't handle IFS=/ for some reason.
|
||||||
|
IFS='%'
|
||||||
|
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||||
|
IFS="${oIFS}"
|
||||||
|
|
||||||
|
pathcomp=''
|
||||||
|
|
||||||
|
while [ $# -ne 0 ] ; do
|
||||||
|
pathcomp="${pathcomp}${1}"
|
||||||
|
shift
|
||||||
|
|
||||||
|
if [ ! -d "${pathcomp}" ] ;
|
||||||
|
then
|
||||||
|
$mkdirprog "${pathcomp}"
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
pathcomp="${pathcomp}/"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]
|
||||||
|
then
|
||||||
|
$doit $instcmd $dst &&
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# If we're going to rename the final executable, determine the name now.
|
||||||
|
|
||||||
|
if [ x"$transformarg" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
dstfile=`basename $dst $transformbasename |
|
||||||
|
sed $transformarg`$transformbasename
|
||||||
|
fi
|
||||||
|
|
||||||
|
# don't allow the sed command to completely eliminate the filename
|
||||||
|
|
||||||
|
if [ x"$dstfile" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make a temp file name in the proper directory.
|
||||||
|
|
||||||
|
dsttmp=$dstdir/#inst.$$#
|
||||||
|
|
||||||
|
# Move or copy the file name to the temp name
|
||||||
|
|
||||||
|
$doit $instcmd $src $dsttmp &&
|
||||||
|
|
||||||
|
trap "rm -f ${dsttmp}" 0 &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits
|
||||||
|
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
|
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||||
|
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||||
|
|
||||||
|
fi &&
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
Reference in New Issue
Block a user