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
 fi;
30
 fi;
31
 
31
 
32
 CHECKOUTDIR="${PWD}"
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
 	echo "'${PWD}' does not look like a DMDirc/meta checkout."
34
 	echo "'${PWD}' does not look like a DMDirc/meta checkout."
35
 	exit 1;
35
 	exit 1;
36
 fi;
36
 fi;
45
 }
45
 }
46
 
46
 
47
 isCommit() {
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
 		echo "0"
49
 		echo "0"
50
 	else
50
 	else
51
 		echo "1"
51
 		echo "1"
52
 	fi;
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
 	echo "Invalid commit in ${REPO}: ${SHA1}"
58
 	echo "Invalid commit in ${REPO}: ${SHA1}"
59
 	exit 1;
59
 	exit 1;
60
 fi;
60
 fi;
72
 git checkout -f ${SHA1}
72
 git checkout -f ${SHA1}
73
 echo -e "\e[39m"
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
 # Now get all the others...
77
 # Now get all the others...
78
 for R in "${VALID_REPOS[@]}"
78
 for R in "${VALID_REPOS[@]}"
79
 do
79
 do
80
 	if [ "${R}" != "${REPO}" ]; then
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
 		echo -ne "\e[32m"
83
 		echo -ne "\e[32m"
84
 		echo "In ${R}: "
84
 		echo "In ${R}: "
85
 		echo -ne "\e[93m"; git show ${RSHA1} -s --format="     Checking out: %H - %s"
85
 		echo -ne "\e[93m"; git show ${RSHA1} -s --format="     Checking out: %H - %s"

Loading…
Cancel
Save