Replaced cp with pax

This commit is contained in:
Nico Schottelius 2006-03-19 01:10:58 +01:00
parent 98ad607421
commit e95a2ea208

View file

@ -299,16 +299,16 @@ while [ "$i" -lt "$no_shares" ]; do
RSYNC_EXTRA="$(cat "$c_rsync_extra")" RSYNC_EXTRA="$(cat "$c_rsync_extra")"
fi fi
# verbosity for rsync
if [ -f "$c_verbose" ]; then
VERBOSE="-v"
fi
# Output a summary # Output a summary
if [ -f "$c_summary" ]; then if [ -f "$c_summary" ]; then
SUMMARY="--stats" SUMMARY="--stats"
fi fi
# verbosity for rsync
if [ -f "$c_verbose" ]; then
VERBOSE="-v"
fi
# MORE verbosity, includes standard verbosity # MORE verbosity, includes standard verbosity
if [ -f "$c_vverbose" ]; then if [ -f "$c_vverbose" ]; then
VERBOSE="-v" VERBOSE="-v"
@ -349,13 +349,16 @@ while [ "$i" -lt "$no_shares" ]; do
# give some info # give some info
echo "Beginning to backup, this may take some time..." echo "Beginning to backup, this may take some time..."
echo "Creating $destination_dir ..."
mkdir $VVERBOSE "$destination_dir"
# only copy if a directory exists # only copy if a directory exists
if [ "$last_dir" ]; then if [ "$last_dir" ]; then
echo "$(date) Hard linking..." echo "$(date) Hard linking..."
cp -al $VVERBOSE "$last_dir" "$destination_dir" cd "$last_dir"
else pax -r -w -l $VVERBOSE . "../$destination_dir"
echo "Creating $destination_dir" # old, gnu cp specific
mkdir $VVERBOSE "$destination_dir" # cp -al $VVERBOSE "$last_dir" "$destination_dir"
fi fi
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then