30 lines
1.0 KiB
Bash
30 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
# Directory where the installer will be downloaded
|
|
INSTALL_DIR="./install-scripts"
|
|
|
|
# Create the install-scripts directory if it doesn't exist
|
|
mkdir -p "$INSTALL_DIR"
|
|
|
|
# Set the URL for the TortoiseGit installer
|
|
# Make sure to replace the URL with the latest version if necessary
|
|
INSTALLER_URL="https://download.tortoisegit.org/tgit/2.12.0.0/TortoiseGit-2.12.0.0-64bit.msi"
|
|
|
|
# Set the installer file name, including the path
|
|
INSTALLER_FILE="$INSTALL_DIR/TortoiseGit-Installer.msi"
|
|
|
|
# Check if the TortoiseGit installer has already been downloaded
|
|
if [ ! -f "$INSTALLER_FILE" ]; then
|
|
# Download TortoiseGit installer
|
|
echo "Downloading TortoiseGit to $INSTALL_DIR..."
|
|
curl -L -o "$INSTALLER_FILE" "$INSTALLER_URL"
|
|
else
|
|
echo "TortoiseGit installer already downloaded."
|
|
fi
|
|
|
|
# Use PowerShell to install TortoiseGit silently
|
|
echo "Installing TortoiseGit..."
|
|
powershell.exe -Command "Start-Process msiexec.exe -ArgumentList '/i $INSTALLER_FILE /quiet /norestart' -Wait"
|
|
|
|
echo "TortoiseGit installation completed."
|