From 720059e502394ebc44e4d01686d2b67f652a32f5 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Thu, 22 Jul 2021 09:59:02 -0700 Subject: [PATCH] Fix bugs (#5175) --- scripts/goog_module/convert-file.sh | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/goog_module/convert-file.sh b/scripts/goog_module/convert-file.sh index fa66fe0f9..24529dab1 100755 --- a/scripts/goog_module/convert-file.sh +++ b/scripts/goog_module/convert-file.sh @@ -257,7 +257,7 @@ run-step() { ####################################### # Prints usage information. ####################################### -help { +help() { echo "Conversion steps:" echo " 1. Use IDE to convert var to let/const" echo " 2. Rewrite the goog.provide statement as goog.module and explicitly enumerate exports" @@ -273,26 +273,26 @@ help { ####################################### # Main entry point. ####################################### -main { +main() { if [ "$1" = "" ]; then - help -else - local filepath="" - # Support filepath as first argument. - verify-filepath "${filepath}" "false" - if [[ $? -eq 0 ]]; then - filepath="$1" - shift - fi + help + else + local filepath="" + # Support filepath as first argument. + verify-filepath "$1" "false" + if [[ $? -eq 0 ]]; then + filepath="$1" + shift + fi - local command="$1" - shift - case $command in - -c) commit-step "$@" "${filepath}" ;; - -s) run-step "$@" "${filepath}" ;; - *) err "INVALID ARGUMENT ${command}";; - esac -fi + local command="$1" + shift + case $command in + -c) commit-step "$@" "${filepath}" ;; + -s) run-step "$@" "${filepath}" ;; + *) err "INVALID ARGUMENT ${command}";; + esac + fi } main "$@"