From 6015a6778a841d3bf7ab1863fd81a566ebf02c4b Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Sun, 13 Jul 2014 17:49:35 -0400 Subject: [PATCH] Small improvement to the script naming technique --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 583a3bf..5b2cb9f 100755 --- a/update +++ b/update @@ -17,7 +17,7 @@ ERRORLOG="update-errors.log" # set the error log filename # script variables (these should not be touched) VERSION=$(printf "%s.r%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)") -SCRIPT_NAME=`echo "$0" | grep -o -e "[^\/]*$"` +SCRIPT_NAME=$(grep -o -e "[^\/]*$" <<< "$0") SCRIPT_HOME="${0%/*}" ### END: VARIABLES ###