This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
echo "=== HackNight Git & SSH Setup Script ===" | |
read -p "Enter your GitHub username: " GIT_NAME | |
read -p "Enter your GitHub email: " GIT_EMAIL | |
configure() { | |
git config --global user.name "$GIT_NAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RUN AS ADMIN | |
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
Write-Warning "Administrator privileges are required to install software. Trying to re-launch as an admin..." | |
Start-Process powershell.exe -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" | |
exit | |
} | |
Set-ExecutionPolicy Unrestricted -Scope Process -Force | |
Write-Host "=== Git & GitHub CLI Setup Script ===" -ForegroundColor Cyan |