6 lines
No EOL
311 B
Bash
Executable file
6 lines
No EOL
311 B
Bash
Executable file
#!/bin/sh
|
|
# https://stackoverflow.com/questions/43650595/is-there-a-command-to-check-if-git-bash-is-opened-in-administrator-mode/58846650#58846650
|
|
if [[ $(sfc 2>&1 | tr -d '\0') =~ SCANNOW ]]
|
|
then choco install "$@"
|
|
else exec powershell -Command "Start-Process 'choco' -Verb runAs -ArgumentList 'install $*'"
|
|
fi |