a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#!/bin/sh
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# install - install a program, script, or datafile
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# This comes from X11R5 (mit/util/scripts/install.sh).
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Copyright 1991 by the Massachusetts Institute of Technology
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Permission to use, copy, modify, distribute, and sell this software and its
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# documentation for any purpose is hereby granted without fee, provided that
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# the above copyright notice appear in all copies and that both that
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# copyright notice and this permission notice appear in supporting
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# documentation, and that the name of M.I.T. not be used in advertising or
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# publicity pertaining to distribution of the software without specific,
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# written prior permission. M.I.T. makes no representations about the
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# suitability of this software for any purpose. It is provided "as is"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# without express or implied warranty.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Calling this script install-sh is preferred over install.sh, to prevent
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# `make' implicit rules from creating a file called install from it
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# when there is no Makefile.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# This script is compatible with the BSD install script, but was written
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# from scratch. It can only install one file at a time, a restriction
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# shared with many OS's install programs.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# set DOITPROG to echo to test this script
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Don't use :- since 4.3BSD and earlier shells don't like it.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdoit="${DOITPROG-}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# put in absolute paths if you don't have them in your path; or use env. vars.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncmvprog="${MVPROG-mv}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsynccpprog="${CPPROG-cp}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncchmodprog="${CHMODPROG-chmod}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncchownprog="${CHOWNPROG-chown}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncchgrpprog="${CHGRPPROG-chgrp}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncstripprog="${STRIPPROG-strip}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncrmprog="${RMPROG-rm}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncmkdirprog="${MKDIRPROG-mkdir}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsynctransformbasename=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsynctransform_arg=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncinstcmd="$mvprog"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncchmodcmd="$chmodprog 0755"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncchowncmd=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncchgrpcmd=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncstripcmd=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncrmcmd="$rmprog -f"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncmvcmd="$mvprog"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncsrc=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdst=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdir_arg=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncwhile [ x"$1" != x ]; do
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync case $1 in
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -c) instcmd="$cpprog"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -d) dir_arg=true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -m) chmodcmd="$chmodprog $2"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -o) chowncmd="$chownprog $2"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -g) chgrpcmd="$chgrpprog $2"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -s) stripcmd="$stripprog"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -t=*) transformarg=`echo $1 | sed 's/-t=//'`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync *) if [ x"$src" = x ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync src=$1
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync # this colon is to work around a 386BSD /bin/sh bug
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync :
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dst=$1
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync continue;;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync esac
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdone
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncif [ x"$src" = x ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncthen
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync echo "install: no input file specified"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync exit 1
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncelse
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncfi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncif [ x"$dir_arg" != x ]; then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dst=$src
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync src=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ -d $dst ]; then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync instcmd=:
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync chmodcmd=""
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync instcmd=mkdir
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncelse
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# might cause directories to be created, which would be especially bad
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# if $src (and thus $dsttmp) contains '*'.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ -f $src -o -d $src ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync echo "install: $src does not exist"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync exit 1
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$dst" = x ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync echo "install: no destination specified"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync exit 1
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# If destination is a directory, append the input filename; if your system
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# does not like double slashes in filenames, you may need to add some logic
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ -d $dst ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dst="$dst"/`basename $src`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncfi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync## this sed command emulates the dirname command
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Make sure that the destination directory exists.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# this part is taken from Noah Friedman's mkinstalldirs script
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Skip lots of stat calls in the usual case.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncif [ ! -d "$dstdir" ]; then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdefaultIFS='
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync'
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncIFS="${IFS-${defaultIFS}}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncoIFS="${IFS}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Some sh's can't handle IFS=/ for some reason.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncIFS='%'
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncIFS="${oIFS}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncpathcomp=''
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncwhile [ $# -ne 0 ] ; do
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync pathcomp="${pathcomp}${1}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync shift
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ ! -d "${pathcomp}" ] ;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync $mkdirprog "${pathcomp}"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync pathcomp="${pathcomp}/"
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncdone
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncfi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncif [ x"$dir_arg" != x ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncthen
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync $doit $instcmd $dst &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncelse
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# If we're going to rename the final executable, determine the name now.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$transformarg" = x ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dstfile=`basename $dst`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dstfile=`basename $dst $transformbasename |
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync sed $transformarg`$transformbasename
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# don't allow the sed command to completely eliminate the filename
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$dstfile" = x ]
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync then
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dstfile=`basename $dst`
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync else
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync true
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync fi
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Make a temp file name in the proper directory.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync dsttmp=$dstdir/#inst.$$#
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Move or copy the file name to the temp name
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync $doit $instcmd $src $dsttmp &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync trap "rm -f ${dsttmp}" 0 &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# and set any options; do chmod last to preserve setuid bits
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# If any of these fail, we abort the whole thing. If we want to
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# ignore errors from any of these, just make sure not to ignore
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# errors from the above "$doit $instcmd $src $dsttmp" command.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync# Now rename the file to the real destination.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync $doit $rmcmd -f $dstdir/$dstfile &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync $doit $mvcmd $dsttmp $dstdir/$dstfile
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncfi &&
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsyncexit 0