From: MegaBrutal Date: Fri, 19 Feb 2016 21:55:00 +0000 (+0100) Subject: backup_diff.sh: Replaced other occurrences of "ls --sort=t" X-Git-Url: http://git.megabrutal.com/?a=commitdiff_plain;h=f02b3f7c12d7445e960ff9ea13a3207412a639e4;p=mgsautils.git backup_diff.sh: Replaced other occurrences of "ls --sort=t" I made a huge mistake in my previous commit and left some occurrences of "ls --sort=t" in the script, thus it was still not operating correctly on FreeBSD. modified: fs/backup_diff.sh --- diff --git a/fs/backup_diff.sh b/fs/backup_diff.sh index 3c557e7..6f03637 100755 --- a/fs/backup_diff.sh +++ b/fs/backup_diff.sh @@ -5,13 +5,13 @@ cd ${STORAGE} dar --verbose --alter=atime --empty-dir --fs-root / --noconf --create ${STORAGE}${FILENAME} --ref $(ls -1t ${STORAGE}*.dar | head -n 1 | cut -d. -f1) -zbzip2:9 -an --exclude-from-file ${EXCLUDE} case $(uname) in - Linux) md5sum -b ${FILENAME}*.dar >> $(ls --sort=t ${FULLNAME}*.md5 | head -n 1);; - *BSD) md5 -r ${FILENAME}*.dar >> $(ls --sort=t ${FULLNAME}*.md5 | head -n 1);; + Linux) md5sum -b ${FILENAME}*.dar >> $(ls -1t ${FULLNAME}*.md5 | head -n 1);; + *BSD) md5 -r ${FILENAME}*.dar >> $(ls -1t ${FULLNAME}*.md5 | head -n 1);; esac case "${XFER_METHOD}" in scp) - su - ${XFER_USER} -c "scp -p ${STORAGE}${FILENAME}* $(ls --sort=t ${STORAGE}${FULLNAME}*.md5 | head -n 1) ${XFER_TARGET}" + su - ${XFER_USER} -c "scp -p ${STORAGE}${FILENAME}* $(ls -1t ${STORAGE}${FULLNAME}*.md5 | head -n 1) ${XFER_TARGET}" ;; rsync) su - ${XFER_USER} -c "rsync -auv ${STORAGE} ${XFER_TARGET}"