Skip to content

Commit

Permalink
fix: version check order
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmerrell committed Jan 9, 2024
1 parent d9fc83b commit 066a07c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#!/usr/bin/env bash

# Unified installer for RunPod CLI tool.
# Unified installer for RunPOd CLI tool.

# Verify the script is run with root privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run as root with sudo."
exit 1
fi

# Fetch the latest version of RunPod CLI
VERSION=$(wget -q -O- https://api.github.com/repos/runpod/runpodctl/releases/latest | jq -r '.name')
if [ -z "$VERSION" ]; then
echo "Failed to fetch the latest version of RunPod CLI."
exit 1
fi

# Detect Operating System and set up environment
OS_TYPE=$(uname -s)
REQUIRED_PKG="jq"
Expand Down Expand Up @@ -56,13 +63,6 @@ setup_environment() {

setup_environment

# Fetch the latest version of RunPod CLI
VERSION=$(wget -q -O- https://api.github.com/repos/runpod/runpodctl/releases/latest | jq -r '.name')
if [ -z "$VERSION" ]; then
echo "Failed to fetch the latest version of RunPod CLI."
exit 1
fi

# Download the CLI tool
CLI_FILE_NAME="runpodctl"
if ! wget "$DOWNLOAD_URL" -O "$CLI_FILE_NAME"; then
Expand Down
Empty file added runpodctl
Empty file.

0 comments on commit 066a07c

Please sign in to comment.