Cosmetics: Be consistent with command substitution syntax

pull/11/head
Dominik D. Geyer 12 years ago
parent 7215554ba6
commit 3a54d02edd

@ -85,7 +85,7 @@ CCAPPEND=" by gitwatch.sh"
IN=$(readlink -f "$1")
if [ -d $1 ]; then
TARGETDIR=`sed -e "s/\/*$//" <<<"$IN"` # dir to CD into before using git commands: trim trailing slash, if any
TARGETDIR=$(sed -e "s/\/*$//" <<<"$IN") # dir to CD into before using git commands: trim trailing slash, if any
INCOMMAND="inotifywait --exclude=\"^${TARGETDIR}/.git\" -qqr -e close_write,moved_to,delete $TARGETDIR" # construct inotifywait-commandline
GITADD="." # add "." (CWD) recursively to index
GITINCOMMAND="-a" # add -a switch to "commit" call just to be sure
@ -102,7 +102,7 @@ fi
while true; do
$INCOMMAND # wait for changes
sleep 2 # wait 2 more seconds to give apps time to write out all changes
DATE=`date "+%Y-%m-%d %H:%M:%S"` # construct date-time string
DATE=$(date "+%Y-%m-%d %H:%M:%S") # construct date-time string
cd $TARGETDIR # CD into right dir
git add $GITADD # add file(s) to index
git commit $GITINCOMMAND -m"${CCPREPEND}(${DATE})${CCAPPEND}" # construct commit message and commit

Loading…
Cancel
Save