Browse Source

Change `` to $() in checkoutAt.sh

pull/114/head
Shane Mc Cormack 7 years ago
parent
commit
a8518320c5
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      checkoutAt.sh

+ 7
- 7
checkoutAt.sh View File

@@ -30,7 +30,7 @@ if [ "${SHA1}" = "" -o ${RES} -ne 0 ]; then
30 30
 fi;
31 31
 
32 32
 CHECKOUTDIR="${PWD}"
33
-if [ ! -e "${CHECKOUTDIR}/settings.gradle" -o "`grep "rootProject.name = 'dmdirc'" settings.gradle 2>&1`" = "" ]; then
33
+if [ ! -e "${CHECKOUTDIR}/settings.gradle" -o "$(grep "rootProject.name = 'dmdirc'" settings.gradle 2>&1)" = "" ]; then
34 34
 	echo "'${PWD}' does not look like a DMDirc/meta checkout."
35 35
 	exit 1;
36 36
 fi;
@@ -45,16 +45,16 @@ getRepoDir() {
45 45
 }
46 46
 
47 47
 isCommit() {
48
-	if [ "`git cat-file -t "${1}" 2>&1`" = "commit" ]; then
48
+	if [ "$(git cat-file -t "${1}" 2>&1)" = "commit" ]; then
49 49
 		echo "0"
50 50
 	else
51 51
 		echo "1"
52 52
 	fi;
53 53
 }
54 54
 
55
-cd `getRepoDir "${REPO}"`
55
+cd $(getRepoDir "${REPO}")
56 56
 
57
-if [ `isCommit ${SHA1}` -eq 1 ]; then
57
+if [ $(isCommit ${SHA1}) -eq 1 ]; then
58 58
 	echo "Invalid commit in ${REPO}: ${SHA1}"
59 59
 	exit 1;
60 60
 fi;
@@ -72,14 +72,14 @@ git reset --hard
72 72
 git checkout -f ${SHA1}
73 73
 echo -e "\e[39m"
74 74
 
75
-THISTIME=`git show ${SHA1} --pretty=format:%ct`
75
+THISTIME=$(git show ${SHA1} --pretty=format:%ct)
76 76
 
77 77
 # Now get all the others...
78 78
 for R in "${VALID_REPOS[@]}"
79 79
 do
80 80
 	if [ "${R}" != "${REPO}" ]; then
81
-		cd `getRepoDir "${R}"`
82
-		RSHA1=`git rev-list -1 --before="${THISTIME}" --all`
81
+		cd $(getRepoDir "${R}")
82
+		RSHA1=$(git rev-list -1 --before="${THISTIME}" --all)
83 83
 		echo -ne "\e[32m"
84 84
 		echo "In ${R}: "
85 85
 		echo -ne "\e[93m"; git show ${RSHA1} -s --format="     Checking out: %H - %s"

Loading…
Cancel
Save