OSDN Git Service

git-submodule.sh: Modern shell scripting (use $() instead of ``)
authorMao Zhongyi <maozhongyi@cmss.chinamobile.com>
Mon, 15 Oct 2018 09:17:35 +0000 (17:17 +0800)
committerThomas Huth <thuth@redhat.com>
Tue, 16 Oct 2018 16:34:19 +0000 (18:34 +0200)
Various shell files contain a mix between obsolete ``
and modern $(); It would be nice to convert to using $()
everywhere.

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
scripts/git-submodule.sh

index 807ca0b..98ca0f2 100755 (executable)
@@ -59,8 +59,8 @@ status)
     fi
 
     test -f "$substat" || exit 1
-    CURSTATUS=`$GIT submodule status $modules`
-    OLDSTATUS=`cat $substat`
+    CURSTATUS=$($GIT submodule status $modules)
+    OLDSTATUS=$(cat $substat)
     test "$CURSTATUS" = "$OLDSTATUS"
     exit $?
     ;;