# HG changeset patch # User Chris Cannam # Date 1452611987 0 # Node ID 248c402992bafa1b3d69b5f576f4d07059a741ec # Parent f81fcbde7eafd92377ddea1cf54124c08a80eec4 Environment as arg diff -r f81fcbde7eaf -r 248c402992ba extra/soundsoftware/export-git.sh --- a/extra/soundsoftware/export-git.sh Tue Jan 12 15:14:36 2016 +0000 +++ b/extra/soundsoftware/export-git.sh Tue Jan 12 15:19:47 2016 +0000 @@ -22,14 +22,17 @@ exit 2 fi -hgdir="$1" -gitdir="$2" +environment="$1" +hgdir="$2" +gitdir="$3" if [ -z "$hgdir" ] || [ -z "$gitdir" ]; then - echo "Usage: $0 " - echo "where hgdir is the directory containing project Mercurial repositories," - echo "and gitdir is the directory in which output git repositories are" - echo "to be created or updated" + echo "Usage: $0 " + echo " where" + echo " - environment is the Rails environment (development or production)" + echo " - hgdir is the directory containing project Mercurial repositories" + echo " - gitdir is the directory in which output git repositories are to be" + echo " created or updated" exit 2 fi @@ -49,7 +52,9 @@ mkdir -p "$authordir" -"$rails" runner -e production "$progdir/create-repo-authormaps.rb" \ +echo "About to extract author maps..." + +"$rails" runner -e "$environment" "$progdir/create-repo-authormaps.rb" \ -s "$hgdir" -o "$authordir" for hgrepo in "$hgdir"/*; do @@ -72,7 +77,7 @@ git init "$gitrepo" fi - echo "About to run fast export..." + echo "About to run fast export for repo $reponame..." ( cd "$gitrepo"