From baa2821eb0ed73c2ddc461431272927e0cf5d71e Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 10 Sep 2014 21:53:53 +0200 Subject: [PATCH] Code cleanup --- src/deforaos-git-hook.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deforaos-git-hook.sh b/src/deforaos-git-hook.sh index c4e0dbb..0ac0581 100755 --- a/src/deforaos-git-hook.sh +++ b/src/deforaos-git-hook.sh @@ -97,9 +97,9 @@ _hook_update() #count the number of commits commit_cnt=$((commit_cnt + 1)) done - all_files=`echo "$all_files" | sed -e '/^$/d'` - files_cnt=`echo "$all_files" | wc -l` - unique_files_cnt=`echo "$all_files" | sort | uniq | wc -l` + all_files=$(echo "$all_files" | sed -e '/^$/d') + files_cnt=$(echo "$all_files" | wc -l) + unique_files_cnt=$(echo "$all_files" | sort | uniq | wc -l) if [ -n "$branch" ]; then if [ $commit_cnt -eq 1 -a -n "$message" ]; then echo "$repository: $author [$branch] $message ($files_cnt alterations in $unique_files_cnt files)"