From 8c2384acbaba4ae4767f83a81b3b92175b85f260 Mon Sep 17 00:00:00 2001 From: Lee Ockert Date: Mon, 23 Oct 2023 00:49:41 -0400 Subject: [PATCH] Remove test code comments, fix indents Fixed some indents and enabled some commented-out code. --- dirdedupe.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dirdedupe.sh b/dirdedupe.sh index 3c98600..0d13464 100755 --- a/dirdedupe.sh +++ b/dirdedupe.sh @@ -50,15 +50,15 @@ fi # MAKE SURE WE HAVE THE RIGHT NUMBER OF ARGUMENTS AND THEY'RE VALID if [ ! $# -eq 2 ]; then - echo && echo "Wrong number of arguments!" && printusage && exit + echo && echo "Wrong number of arguments!" && printusage && exit else - masterdir=$1 - subjectdir=$2 - if [ ! -d "${masterdir}" ]; then - echo && echo "${masterdir} is not a directory!" && printusage && exit - elif [ ! -d "${subjectdir}" ]; then - echo && echo "${subjectdir} is not a directory!" && printusage && exit - fi + masterdir=$1 + subjectdir=$2 + if [ ! -d "${masterdir}" ]; then + echo && echo "${masterdir} is not a directory!" && printusage && exit + elif [ ! -d "${subjectdir}" ]; then + echo && echo "${subjectdir} is not a directory!" && printusage && exit + fi fi ############################################################################ @@ -82,12 +82,12 @@ do echo "LINK \"${masterfile}\" <-- \"${subjectfile}\"" # Store the mtime/atime of subject file's directory TEMPSUBJDIR=`dirname "${subjectfile}"` - #touch -r "${TEMPSUBJDIR}" "${TEMPFILE}" + touch -r "${TEMPSUBJDIR}" "${TEMPFILE}" # Link the subject file to the corresponding file in # the master directory ln -Pf "${masterfile}" "${subjectfile}" # Restore the mtime/atime of subject file's directory - #touch -r "${TEMPFILE}" "${TEMPSUBJDIR}" + touch -r "${TEMPFILE}" "${TEMPSUBJDIR}" else echo "HYPO \"${masterfile}\" <~~ \"${subjectfile}\"" TEMPSUBJDIR=`dirname "${subjectfile}"`