Skip to content

Commit

Permalink
Add yq download to script
Browse files Browse the repository at this point in the history
  • Loading branch information
pranaydotparity committed Nov 11, 2024
1 parent 4c22114 commit 329d944
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dotlakeIngest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
#!/bin/bash

# Check the operating system and install yq if not already installed
if [[ $(uname) == "Darwin" ]]; then
# macOS
if ! command -v yq &> /dev/null; then
echo "yq is not installed. Installing yq..."
brew install yq
fi
elif [[ $(uname) == "Linux" ]]; then
# Linux
if ! command -v yq &> /dev/null; then
echo "yq is not installed. Installing yq..."
go install github.com/mikefarah/yq/v4@latest
fi
else
echo "Unsupported operating system. Please install yq manually."
exit 1
fi

# Check if yq is installed
if ! command -v yq &> /dev/null; then
echo "yq is not installed. Please install it to parse YAML files."
Expand Down

0 comments on commit 329d944

Please sign in to comment.