Commits

Jakub Wilk committed 53dc6e6

Use $() instead of backticks.

Comments (0)

Files changed (1)

 (
     set -e
     flock -w 3 9
-    n=`cat "${lockfile}.n" 2>/dev/null` || true
+    n=$(cat "${lockfile}.n" 2>/dev/null) || true
     if [ -z "$n" ]
     then
         n=0
-        lockcounter=`mktemp /dev/shm/sshpg.XXXXXX`
+        lockcounter=$(mktemp /dev/shm/sshpg.XXXXXX)
         ln -sf "$lockcounter" "${lockfile}.n"
     fi
     printf $((n+1)) > "${lockfile}.n"
         symlink="${gpg_key%.gpg}"
         if ! [ -s "$symlink" ]
         then
-            key=`mktemp /dev/shm/sshpg.XXXXXX`
+            key=$(mktemp /dev/shm/sshpg.XXXXXX)
             gpg --decrypt "$gpg_key" > "$key"
             ln -sf "$key" "$symlink"
         fi
 
 [ $? -eq 0 ] || exit 1
 
-"`basename "$0"`" "$@"
+"$(basename "$0")" "$@"
 
 exitcode=$?
 
 (
     set -e
     flock -w 3 9
-    n=`cat "${lockfile}.n" 2>/dev/null`
+    n=$(cat "${lockfile}.n" 2>/dev/null)
     n=$((n-1))
     if [ $n -le 0 ]
     then
         for gpg_key in ~/.ssh/*.gpg
         do
             symlink="${gpg_key%.gpg}"
-            rm -f `readlink "$symlink"` || true
+            rm -f $(readlink "$symlink") || true
             rm -f "$symlink"
         done
-        rm -f `readlink "${lockfile}.n"`
+        rm -f $(readlink "${lockfile}.n")
         rm -f "${lockfile}.n"
     else
         printf $n > "${lockfile}.n"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.