mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2025-10-19 09:27:19 +02:00
fix: update install script for GoReleaser binary format
- Change from sshm-darwin-arm64.tar.gz to sshm_Darwin_arm64.tar.gz - Update architecture mapping (amd64 -> x86_64) - Update OS mapping (darwin -> Darwin) - Fix extracted binary name (now just 'sshm' instead of platform suffix)
This commit is contained in:
parent
55f3359287
commit
7b15db1f34
@ -56,7 +56,25 @@ getLatestVersion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
downloadBinary() {
|
downloadBinary() {
|
||||||
GITHUB_FILE="sshm-${OS}-${ARCH}.tar.gz"
|
# Map OS names to match GoReleaser format
|
||||||
|
local GORELEASER_OS="$OS"
|
||||||
|
case $OS in
|
||||||
|
"darwin") GORELEASER_OS="Darwin" ;;
|
||||||
|
"linux") GORELEASER_OS="Linux" ;;
|
||||||
|
"windows") GORELEASER_OS="Windows" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Map architecture names to match GoReleaser format
|
||||||
|
local GORELEASER_ARCH="$ARCH"
|
||||||
|
case $ARCH in
|
||||||
|
"amd64") GORELEASER_ARCH="x86_64" ;;
|
||||||
|
"arm64") GORELEASER_ARCH="arm64" ;;
|
||||||
|
"386") GORELEASER_ARCH="i386" ;;
|
||||||
|
"arm") GORELEASER_ARCH="armv6" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# GoReleaser format: sshm_Darwin_arm64.tar.gz
|
||||||
|
GITHUB_FILE="sshm_${GORELEASER_OS}_${GORELEASER_ARCH}.tar.gz"
|
||||||
GITHUB_URL="https://github.com/Gu1llaum-3/sshm/releases/download/$LATEST_VERSION/$GITHUB_FILE"
|
GITHUB_URL="https://github.com/Gu1llaum-3/sshm/releases/download/$LATEST_VERSION/$GITHUB_FILE"
|
||||||
|
|
||||||
printf "${YELLOW}Downloading $GITHUB_FILE...${NC}\n"
|
printf "${YELLOW}Downloading $GITHUB_FILE...${NC}\n"
|
||||||
@ -74,8 +92,8 @@ downloadBinary() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the expected binary exists (no find needed)
|
# GoReleaser extracts the binary as just "sshm", not with the platform suffix
|
||||||
EXTRACTED_BINARY="./sshm-${OS}-${ARCH}"
|
EXTRACTED_BINARY="./sshm"
|
||||||
if [ ! -f "$EXTRACTED_BINARY" ]; then
|
if [ ! -f "$EXTRACTED_BINARY" ]; then
|
||||||
printf "${RED}Could not find extracted binary: $EXTRACTED_BINARY${NC}\n"
|
printf "${RED}Could not find extracted binary: $EXTRACTED_BINARY${NC}\n"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user