Skip to content

Commit

Permalink
system version fix (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
dayne authored Feb 12, 2025
1 parent 36d23aa commit c449058
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ esac
TMPDIR=$(mktemp -d)
export TAR_FILE="${TMPDIR}/${FILE_BASENAME}_$(uname -s)_${ARCHITECTURE}.tar.gz"

# Get system type (Linux | Freebsd | Darwin ) as lowercase
SYSTEM=$(uname -s | awk '{print tolower($0)}')

# Download the binary
echo "Downloading Dagu $VERSION..."
curl -sfLo "$TAR_FILE" "$RELEASES_URL/download/$VERSION/${FILE_BASENAME}_${VERSION:1}_$(uname -s)_${ARCHITECTURE}.tar.gz" || {
curl -sfLo "$TAR_FILE" "$RELEASES_URL/download/$VERSION/${FILE_BASENAME}_${VERSION#v}_${SYSTEM}_${ARCHITECTURE}.tar.gz" || {
echo "Failed to download the file. Check your internet connection and the URL." >&2
exit 1
}
Expand All @@ -56,4 +59,4 @@ rm -rf "$TMPDIR"
echo "Dagu installed successfully and is available at /usr/local/bin/dagu"

# Execute the binary with any provided arguments
"/usr/local/bin/dagu" "$@"
"/usr/local/bin/dagu" "$@"

0 comments on commit c449058

Please sign in to comment.