#!/usr/bin/env bash REPOS=( "$@" ) BASE_PATH="/home/user/nwellpott/svnMigration" function migrate() { # change dir /usr/bin/printf "changing directory to %s\n" "$REPO" cd "$BASE_PATH/$REPO" || exit 1 # rebase /usr/bin/printf "attempt to fetch %s commits\n" "$REPO" /usr/bin/svn2git --rebase } function clean() { # clean up git tree thoroughly /usr/bin/git gc --aggressive } function push() { # push changes /usr/bin/git push --all # push tags /usr/bin/git push --tags } # main for REPO in "${REPOS[@]}"; do migrate clean push done