summaryrefslogtreecommitdiff
path: root/hg-fast-export.sh
diff options
context:
space:
mode:
authorBarak A. Pearlmutter <barak+git@cs.nuim.ie>2011-04-14 09:57:19 +0100
committerBarak A. Pearlmutter <barak+git@cs.nuim.ie>2011-09-11 22:22:28 +0100
commit9f3c019a7b375933d669950c46ac02e94b08737c (patch)
tree83db05dbe949dfe392d48ae2396907b8d1add61a /hg-fast-export.sh
parent25387e26be7ab51523ebda7e2ad50bba325a7637 (diff)
downloadhg-fast-export-9f3c019a7b375933d669950c46ac02e94b08737c.tar.gz
switch old deprecated sh syntax `...` to new approved $(...)
Diffstat (limited to 'hg-fast-export.sh')
-rwxr-xr-xhg-fast-export.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/hg-fast-export.sh b/hg-fast-export.sh
index 334f286..8a071a7 100755
--- a/hg-fast-export.sh
+++ b/hg-fast-export.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007, 2008 Rocco Rutte <pdmef@gmx.net> and others.
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
-ROOT="`dirname $0`"
+ROOT="$(dirname $0)"
REPO=""
PFX="hg2git"
SFX_MAPPING="mapping"
@@ -62,7 +62,7 @@ done
# for convenience: get default repo from state file
if [ x"$REPO" = x -a -f "$GIT_DIR/$PFX-$SFX_STATE" ] ; then
- REPO="`egrep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`"
+ REPO="$(egrep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2)"
echo "Using last hg repository \"$REPO\""
fi
@@ -96,10 +96,10 @@ cat "$GIT_DIR/$PFX-$SFX_MARKS.old" "$GIT_DIR/$PFX-$SFX_MARKS.tmp" \
# save SHA1s of current heads for incremental imports
# and connectivity (plus sanity checking)
-for head in `git branch | sed 's#^..##'` ; do
- id="`git rev-parse $head`"
+for head in $(git branch | sed 's#^..##') ; do
+ id="$(git rev-parse $head)"
echo ":$head $id"
done > "$GIT_DIR/$PFX-$SFX_HEADS"
# check diff with color:
-# ( for i in `find . -type f | grep -v '\.git'` ; do diff -u $i $REPO/$i ; done | cdiff ) | less -r
+# ( for i in $(find . -type f | grep -v '\.git') ; do diff -u $i $REPO/$i ; done | cdiff ) | less -r