do not interrupt flow if repo is missing

+ add continue statements to skip iterations

allows for a smoother workflow reducing the risk of a single typo interrupting a larger batch of repos in process
master
nico wellpott 4 years ago
parent 006678e272
commit 41c6d20dca
Signed by: nwellpott
GPG Key ID: 1F6495B44DABCE6E

@ -6,7 +6,7 @@ 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
cd "$BASE_PATH/$REPO" || return 1
# rebase
/usr/bin/printf "attempt to fetch %s commits\n" "$REPO"
@ -20,7 +20,7 @@ function clean() {
function push() {
# push changes
/usr/bin/git push --all
/usr/bin/git push --all || return 1
# push tags
/usr/bin/git push --tags
@ -28,9 +28,9 @@ function push() {
# main
for REPO in "${REPOS[@]}"; do
migrate
migrate || continue
clean
push
push || continue
done

Loading…
Cancel
Save