# Puffin Projects
## Windows
```
Invoke-Command -ScriptBlock { param ($url) $fileName=Split-Path -Path "$url" -Leaf; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; invoke-WebRequest -Uri "$url" -Outfile "$fileName"; Start-Process -Wait -FilePath msiexec -ArgumentList /i,$fileName,/qn,LicenseAccepted=YES,/L*V,installation.log ; } -ArgumentList "https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFK9OE3CHS_windows_x64.msi"
```
## Linux (ARM)
```
export URL="https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFK9OE3CHS_linux_arm64" && export baseName="$(basename $URL)" && wget --secure-protocol=TLSv1_2 $URL -O "/tmp/$baseName" && sudo chmod a+x /tmp/$baseName && sudo /tmp/$baseName --quiet yes --AcceptLicense yes --verbose yes 2>&1 | sudo tee /tmp/superopsInstallation.log
```
## Linux (AMD0
```
export URL="https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFK9OE3CHS_linux_amd64" && export baseName="$(basename $URL)" && wget --secure-protocol=TLSv1_2 $URL -O "/tmp/$baseName" && sudo chmod a+x /tmp/$baseName && sudo /tmp/$baseName --quiet yes --AcceptLicense yes --verbose yes 2>&1 | sudo tee /tmp/superopsInstallation.log
```
# Ian
## Windows
```
Invoke-Command -ScriptBlock { param ($url) $fileName=Split-Path -Path "$url" -Leaf; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; invoke-WebRequest -Uri "$url" -Outfile "$fileName"; Start-Process -Wait -FilePath msiexec -ArgumentList /i,$fileName,/qn,LicenseAccepted=YES,/L*V,installation.log ; } -ArgumentList "https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFNI8Z05Q8_windows_x64.msi"
```
## Mac
```
url="https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFNI8Z05Q8_Macos_amd64.pkg"; silentInstall="true"; LOG_NAME="/Users/Shared/superopsInstallation.log"; echo "Starting Installing" > $LOG_NAME; waitForProcess() { processName=$1; fixedDelay=$2; terminate=$3; echo "$(date) | Waiting for [$processName]"; while pgrep -f "$processName" >/dev/null; do [ "$terminate" = "true" ] && { echo "$(date) | Terminating [$processName]..."; pkill -f "$processName"; return; } ; delay=${fixedDelay:-$((RANDOM % 50 + 10))} ; echo "$(date) | Waiting [$delay] seconds" ; sleep $delay ; done ; echo "$(date) | [$processName] ended"; }; checkForRosetta2() { echo "$(date) | Checking for Rosetta 2"; waitForProcess "/usr/sbin/softwareupdate" ; IFS='.' read -r osvers_major osvers_minor <<< "$(/usr/bin/sw_vers -productVersion)" ; [ "$osvers_major" -ge 11 ] && { [ "$(sysctl -n machdep.cpu.brand_string | grep -o "Intel")" ] && echo "$(date) | Intel processor detected" || { pgrep oahd >/dev/null 2>&1 && echo "$(date) | Rosetta installed" || { /usr/sbin/softwareupdate --install-rosetta --agree-to-license && echo "$(date) | Rosetta installed successfully" || { echo "$(date) | Rosetta installation failed" ; exit 1 ; } ; } ; } ; } || echo "$(date) | macOS version $osvers_major.$osvers_minor. No Rosetta needed" ; }; checkForRosetta2; DIRECTORY="/Users/Shared/SuperopsInstaller"; [ ! -d "$DIRECTORY" ] && mkdir -p "$DIRECTORY" && echo "Directory created at: $DIRECTORY"; configFile="/Users/Shared/SuperopsInstaller/soppinstallconfig.properties"; echo "Silent_Install=$silentInstall" > $configFile; echo "Installing" >> $LOG_NAME; export URL=$url; export baseName="$(basename $URL)"; export downLoadFile="/Users/Shared/$baseName"; curl --url "$URL" --output "$downLoadFile" && cd /Users/Shared && sudo -S installer -dumplog -pkg "$baseName" -target /; t=$?; [ -f "$configFile" ] && rm -f "$configFile"; echo "$t is" >> $LOG_NAME; [ $t -ne 0 ] && { echo "Failed to Install $t" >> $LOG_NAME; exit 1; } || echo "Installation success" >> $LOG_NAME; exit 0
```
## Linux (ARM)
```
export URL="https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFNI8Z05Q8_linux_arm64" && export baseName="$(basename $URL)" && wget --secure-protocol=TLSv1_2 $URL -O "/tmp/$baseName" && sudo chmod a+x /tmp/$baseName && sudo /tmp/$baseName --quiet yes --AcceptLicense yes --verbose yes 2>&1 | sudo tee /tmp/superopsInstallation.log
```
Linux (AMD):
```
export URL="https://eu-superops-wininstaller-prod.s3.eu-central-1.amazonaws.com/agent/6237161766872416256/1BDXLBJLV8L4W_1OMCFNI8Z05Q8_linux_amd64" && export baseName="$(basename $URL)" && wget --secure-protocol=TLSv1_2 $URL -O "/tmp/$baseName" && sudo chmod a+x /tmp/$baseName && sudo /tmp/$baseName --quiet yes --AcceptLicense yes --verbose yes 2>&1 | sudo tee /tmp/superopsInstallation.log
```