Remove test code comments, fix indents
Fixed some indents and enabled some commented-out code.
This commit is contained in:
20
dirdedupe.sh
20
dirdedupe.sh
@ -50,15 +50,15 @@ fi
|
|||||||
|
|
||||||
# MAKE SURE WE HAVE THE RIGHT NUMBER OF ARGUMENTS AND THEY'RE VALID
|
# MAKE SURE WE HAVE THE RIGHT NUMBER OF ARGUMENTS AND THEY'RE VALID
|
||||||
if [ ! $# -eq 2 ]; then
|
if [ ! $# -eq 2 ]; then
|
||||||
echo && echo "Wrong number of arguments!" && printusage && exit
|
echo && echo "Wrong number of arguments!" && printusage && exit
|
||||||
else
|
else
|
||||||
masterdir=$1
|
masterdir=$1
|
||||||
subjectdir=$2
|
subjectdir=$2
|
||||||
if [ ! -d "${masterdir}" ]; then
|
if [ ! -d "${masterdir}" ]; then
|
||||||
echo && echo "${masterdir} is not a directory!" && printusage && exit
|
echo && echo "${masterdir} is not a directory!" && printusage && exit
|
||||||
elif [ ! -d "${subjectdir}" ]; then
|
elif [ ! -d "${subjectdir}" ]; then
|
||||||
echo && echo "${subjectdir} is not a directory!" && printusage && exit
|
echo && echo "${subjectdir} is not a directory!" && printusage && exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -82,12 +82,12 @@ do
|
|||||||
echo "LINK \"${masterfile}\" <-- \"${subjectfile}\""
|
echo "LINK \"${masterfile}\" <-- \"${subjectfile}\""
|
||||||
# Store the mtime/atime of subject file's directory
|
# Store the mtime/atime of subject file's directory
|
||||||
TEMPSUBJDIR=`dirname "${subjectfile}"`
|
TEMPSUBJDIR=`dirname "${subjectfile}"`
|
||||||
#touch -r "${TEMPSUBJDIR}" "${TEMPFILE}"
|
touch -r "${TEMPSUBJDIR}" "${TEMPFILE}"
|
||||||
# Link the subject file to the corresponding file in
|
# Link the subject file to the corresponding file in
|
||||||
# the master directory
|
# the master directory
|
||||||
ln -Pf "${masterfile}" "${subjectfile}"
|
ln -Pf "${masterfile}" "${subjectfile}"
|
||||||
# Restore the mtime/atime of subject file's directory
|
# Restore the mtime/atime of subject file's directory
|
||||||
#touch -r "${TEMPFILE}" "${TEMPSUBJDIR}"
|
touch -r "${TEMPFILE}" "${TEMPSUBJDIR}"
|
||||||
else
|
else
|
||||||
echo "HYPO \"${masterfile}\" <~~ \"${subjectfile}\""
|
echo "HYPO \"${masterfile}\" <~~ \"${subjectfile}\""
|
||||||
TEMPSUBJDIR=`dirname "${subjectfile}"`
|
TEMPSUBJDIR=`dirname "${subjectfile}"`
|
||||||
|
|||||||
Reference in New Issue
Block a user