| |
---|
| | |
---|
| | shift $((OPTIND-1)) |
---|
| | for arg in $* |
---|
| | do |
---|
| | real=$(readlink -f $arg) |
---|
| | SRCDIR=$(dirname $real) |
---|
| | SRCFIL=$(basename $real) |
---|
| | REALPATH=$(readlink -f $arg) |
---|
| | SRCDIR=$(dirname $REALPATH) |
---|
| | SRCFIL=$(basename $REALPATH) |
---|
| | DESDIR=${GRAVEYARD}${SRCDIR} |
---|
| | SERIAL=$(date +%Y%m%d%s%N) |
---|
| | DESFIL="${SRCFIL}.${SERIAL}" |
---|
| | |
---|
| | CMD="${OPERATOR} $VERBOSE '${SRCFIL}' '${DESDIR}/${DESFIL}'" |
---|
| | CMD="${OPERATOR} $VERBOSE '${REALPATH}' '${DESDIR}/${DESFIL}'" |
---|
| | |
---|
| | if [ -n "${TESTMODE}" ] |
---|
| | then |
---|
| | echo ${CMD} |
---|
| | else |
---|
| | mkdir -p ${DESDIR} |
---|
| | echo ${CMD} |
---|
| | eval ${CMD} |
---|
| | fi |
---|
| | |
---|
| | done |
---|
| | |
---|
| | |