From 6f2c4078ef878b1629c50801ce5aa61cba830de9 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Tue, 9 May 2023 16:22:02 +0200 Subject: [PATCH] Fix macOS installer script (#844) Create /usr/local/bin/ folder before installation --- release_files/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release_files/install.sh b/release_files/install.sh index fda7ea56e..63b8d81c3 100644 --- a/release_files/install.sh +++ b/release_files/install.sh @@ -36,6 +36,7 @@ download_release_binary() { echo "Installing $1 from $DOWNLOAD_URL" cd /tmp && curl -LO "$DOWNLOAD_URL" + if [ "$OS_TYPE" = "darwin" ] && [ "$1" = "$UI_APP" ]; then INSTALL_DIR="/Applications/NetBird UI.app" @@ -43,8 +44,9 @@ download_release_binary() { unzip -q -o "$BINARY_NAME" mv "netbird_ui_${OS_TYPE}_${ARCH}" "$INSTALL_DIR" else + sudo mkdir -p "$INSTALL_DIR" tar -xzvf "$BINARY_NAME" - sudo mv "${1%_"${BINARY_BASE_NAME}"}" "$INSTALL_DIR" + sudo mv "${1%_"${BINARY_BASE_NAME}"}" "$INSTALL_DIR/" fi } @@ -281,4 +283,4 @@ install_netbird() { echo "sudo netbird up" } -install_netbird \ No newline at end of file +install_netbird