Skip to content

Instantly share code, notes, and snippets.

@Scyne
Last active August 1, 2022 16:39
Show Gist options
  • Save Scyne/378b391ae780c2314059a94a1a2eb0db to your computer and use it in GitHub Desktop.
Save Scyne/378b391ae780c2314059a94a1a2eb0db to your computer and use it in GitHub Desktop.
Scyne's ani-cli installer
Write-Host "Starting Scyne's ani-cli installer..."
Write-Host "Yo-Ho!"
Function pause ($message)
{
# Check if running Powershell ISE
if ($psISE)
{
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.MessageBox]::Show("$message")
}
else
{
Write-Host "$message" -ForegroundColor Yellow
$x = $host.ui.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
}
$EXPOL = Get-ExecutionPolicy
If($EXPOL -eq "RemoteSigned" -or $EXPOL -eq "Bypass" ) {
;
} else {
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Write-Host "NOTE: Your Script Execution policy has been changed to ""RemoteSigned""!"
}
If(Test-Path -Path $home\scoop) {
Write-Host "Scoop is installed. Skipping to Package installs...";
} else {
Write-Host "Installing Scoop...";
iex "& {$(irm get.scoop.sh)} -RunAsAdmin";
Write-Host "Starting Package installs..."
}
scoop bucket add extras
scoop install git
git config --global credential.helper manager-core
scoop install ani-cli
scoop install grep
scoop install sed
scoop install gawk
scoop install curl
scoop install openssl
scoop install mpv
scoop install axel
scoop install ffmpeg
scoop install fzf
$SourceFilePath = "$((Get-Command powershell.exe).Definition)"
If(Test-Path -Path $Home\Desktop) {
$ShortcutPath = "$Home\Desktop\ani-cli.lnk";
} else {
$ShortcutPath = "$Home\OneDrive\Desktop\ani-cli.lnk";
}
$WScriptObj = New-Object -ComObject ("WScript.Shell")
$shortcut = $WscriptObj.CreateShortcut($ShortcutPath)
$shortcut.TargetPath = $SourceFilePath
$shortcut.Arguments = "-Command ""& {ani-cli -r 2}"""
Write-Host "Creating shortcut at $ShortcutPath..."
$shortcut.Save()
Write-Host "ani-cli has been sucessfuly installed!"
"You can find documentation on how to use ani-cli on https://github.com/pystardust/ani-cli/blob/master/README.md"
pause "You can close this window or press any key to launch ani-cli."
.$ShortcutPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment