Skip to content

Commit 0d37b2f

Browse files
authored
fix: install script archive
1 parent 7c2d1f8 commit 0d37b2f

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

scripts/install.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ fi
1919
case "$OS" in
2020
linux)
2121
case "$ARCH" in
22-
x86_64) ARCHIVE="denode-manager-linux-amd64.zip" ;;
23-
armv6*) ARCHIVE="denode-manager-linux-armv6.zip" ;;
24-
aarch64) ARCHIVE="denode-manager-linux-arm64.zip" ;;
22+
x86_64) ARCHIVE="denode-manager-linux-amd64" ;;
23+
armv6*) ARCHIVE="denode-manager-linux-armv6" ;;
24+
aarch64) ARCHIVE="denode-manager-linux-arm64" ;;
2525
*) echo -e "${RED}ERROR: Unsupported architecture: ${BOLD}$ARCH${NC}"; exit 1 ;;
2626
esac
2727
;;
2828
darwin)
2929
case "$ARCH" in
30-
x86_64) ARCHIVE="denode-manager-darwin-amd64.zip" ;;
31-
arm64) ARCHIVE="denode-manager-darwin-arm64.zip" ;;
30+
x86_64) ARCHIVE="denode-manager-darwin-amd64" ;;
31+
arm64) ARCHIVE="denode-manager-darwin-arm64" ;;
3232
*) echo -e "${RED}ERROR: Unsupported architecture: ${BOLD}$ARCH${NC}"; exit 1 ;;
3333
esac
3434
;;
@@ -42,17 +42,17 @@ LOGS_DIR="$INSTALL_DIR/logs"
4242

4343
echo -e "\n${BLUE}=== Starting Denode Manager Installation ===${NC}\n"
4444
echo -e "${YELLOW}Detected OS: ${BOLD}$OS${NC}, Architecture: ${BOLD}$ARCH${NC}"
45-
echo -e "${YELLOW}Selected archive: ${BOLD}$ARCHIVE${NC}"
45+
echo -e "${YELLOW}Selected archive: ${BOLD}$ARCHIVE.zip${NC}"
4646
echo -e "${YELLOW}Installation directory: ${BOLD}$INSTALL_DIR${NC}\n"
4747

48-
if [ ! -f "$ARCHIVE" ]; then
49-
echo -e "${RED}ERROR: Archive ${BOLD}$ARCHIVE${NC} not found in current directory"
48+
if [ ! -f "$ARCHIVE.zip" ]; then
49+
echo -e "${RED}ERROR: Archive ${BOLD}$ARCHIVE.zip${NC} not found in current directory"
5050
exit 1
5151
fi
5252

5353
TEMP_DIR=$(mktemp -d)
5454
echo -e "${YELLOW}Extracting zip archive to ${BOLD}$TEMP_DIR${NC}..."
55-
unzip -q "$ARCHIVE" -d "$TEMP_DIR"
55+
unzip -q "$ARCHIVE.zip" -d "$TEMP_DIR"
5656
if [ $? -ne 0 ]; then
5757
echo -e "${RED}ERROR: Failed to extract zip archive${NC}"
5858
rm -rf "$TEMP_DIR"
@@ -75,6 +75,7 @@ if [ -n "$TAR_FILE" ]; then
7575
echo -e "${GREEN}Removed intermediate tar.gz file${NC}"
7676
else
7777
echo -e "${YELLOW}No tar.gz file found, assuming direct extraction from zip${NC}"
78+
TEMP_DIR=$TEMP_DIR/$ARCHIVE
7879
fi
7980

8081
# Define paths to expected files in the extracted archive

0 commit comments

Comments
 (0)