Fix macOS installer script (#844)

Create /usr/local/bin/ folder before installation
This commit is contained in:
Maycon Santos
2023-05-09 16:22:02 +02:00
committed by GitHub
parent f4ec1699ca
commit 6f2c4078ef

View File

@@ -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
install_netbird