Skip to content

Commit 30833e3

Browse files
committed
feat: add CLI binary checks to migrate.sh
1 parent 8d103f2 commit 30833e3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

monorepo-migration/migrate.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
# Exit on error
44
set -e
55

6+
# Function to check if a command exists
7+
check_command() {
8+
if ! command -v "$1" >/dev/null 2>&1; then
9+
echo "Error: $1 is not installed or not in PATH." >&2
10+
exit 1
11+
fi
12+
}
13+
14+
# Check for necessary CLI binaries
15+
check_command git
16+
check_command python3
17+
check_command mvn
18+
619
# Configuration
720
MONOREPO_URL="https://github.com/googleapis/google-cloud-java"
821
SOURCE_REPO_URL="https://github.com/googleapis/java-logging"

0 commit comments

Comments
 (0)