Files
proxmox-tools/windows-tools/install.sh

43 lines
1020 B
Bash
Executable File

#!/bin/bash
set -e
INSTALL_DIR="/usr/local/bin"
BINARY_NAME="proxmox-windows"
echo "=========================================="
echo "Proxmox Windows Tool Installer"
echo "=========================================="
echo ""
if [ "$EUID" -ne 0 ]; then
echo "Error: This script must be run as root (use sudo)"
exit 1
fi
if ! command -v go &> /dev/null; then
echo "Error: Go is not installed. Please install Go 1.19+ first."
echo "Visit: https://golang.org/doc/install"
exit 1
fi
echo "Building binary..."
go build -o $BINARY_NAME
echo "Installing to $INSTALL_DIR..."
cp $BINARY_NAME $INSTALL_DIR/
chmod +x $INSTALL_DIR/$BINARY_NAME
echo ""
echo "=========================================="
echo "Installation completed successfully!"
echo "=========================================="
echo ""
echo "You can now use: $BINARY_NAME"
echo ""
echo "Examples:"
echo " $BINARY_NAME -h"
echo " $BINARY_NAME -config config.yaml"
echo " $BINARY_NAME -list-storage -proxmox-host 192.168.1.100"
echo ""