mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-25 20:41:57 +00:00
Compare commits
No commits in common. "ebbc553576fa2bbd55196cbdbf8f8d35e91c59be" and "97de482afa356b84068f177a81f1c3276838f21b" have entirely different histories.
ebbc553576
...
97de482afa
@ -16,9 +16,6 @@ CPFLAGS=-Rpfv
|
|||||||
# override default...
|
# override default...
|
||||||
COPY=$RSYNC
|
COPY=$RSYNC
|
||||||
COPYFLAGS=$RSYNCFLAGS
|
COPYFLAGS=$RSYNCFLAGS
|
||||||
VERIFY=$RSYNC
|
|
||||||
VERIFYFLAGS=-n $RSYNCFLAGS
|
|
||||||
|
|
||||||
|
|
||||||
COMPRESSOR=./compress-archive.sh
|
COMPRESSOR=./compress-archive.sh
|
||||||
COMPRESS=1
|
COMPRESS=1
|
||||||
@ -257,51 +254,15 @@ while true ; do
|
|||||||
|
|
||||||
mkdir -vp "$DIR"
|
mkdir -vp "$DIR"
|
||||||
|
|
||||||
while true ; do
|
echo "Copying files from ${BASE}${DRIVE} (~`du -hs "${BASE}${DRIVE}" | cut -f 1`)..."
|
||||||
echo "Copying files from ${BASE}${DRIVE} (~`du -hs "${BASE}${DRIVE}" | cut -f 1`)..."
|
$COPY $COPYFLAGS ${BASE}${DRIVE}/* "$DIR" \
|
||||||
$COPY $COPYFLAGS ${BASE}${DRIVE}/* "$DIR" \
|
2> >(tee "${DIR}"/copy-err.log)
|
||||||
2> >(tee "${DIR}"/copy-err.log)
|
# no errors -> remove log...
|
||||||
# no errors -> remove log...
|
if ! [ -s "${DIR}/copy-err.log" ] ; then
|
||||||
if ! [ -s "${DIR}/copy-err.log" ] ; then
|
rm -f "${DIR}"/copy-err.log
|
||||||
rm -f "${DIR}"/copy-err.log
|
fi
|
||||||
fi
|
echo "Copying files: done."
|
||||||
echo "Copying files: done."
|
|
||||||
|
|
||||||
# verify copy...
|
|
||||||
# XXX make this more generic...
|
|
||||||
if ! [ -z $VERIFY ] ; then
|
|
||||||
echo "Verifying copied files..."
|
|
||||||
$VERIFY $VERIFYFLAGS ${BASE}${DRIVE}/* "$DIR" \
|
|
||||||
> >(tee "${DIR}"/verification-err.log)
|
|
||||||
if ! [ -s "${DIR}/verification-err.log" ] ; then
|
|
||||||
rm -f "${DIR}"/verification-err.log
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "WARNING: found mismatching files"
|
|
||||||
echo " (see: "${DIR}"/verification-err.log)"
|
|
||||||
echo
|
|
||||||
while true; do
|
|
||||||
read -ep "[R]etry, [c]ontinue, or Ctrl-C to cancel: " ACTION
|
|
||||||
ACTION=`echo ${ACTION,,} | xargs`
|
|
||||||
if [[ $ACTION =~ [rc] ]] \
|
|
||||||
|| [ -z $ACTION ] ; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
echo "Unknown input: \"$ACTION\""
|
|
||||||
done
|
|
||||||
if [[ $ACTION == "c" ]] ; then
|
|
||||||
break
|
|
||||||
else
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "Verifification: done."
|
|
||||||
break
|
|
||||||
# no verification defined...
|
|
||||||
else
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# exit interactive mode...
|
# exit interactive mode...
|
||||||
if [[ ! $MULTI || ! $INTERACTIVE || $LAST ]] ; then
|
if [[ ! $MULTI || ! $INTERACTIVE || $LAST ]] ; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user