2022-08-09 19:47:51 +02:00
|
|
|
#!/bin/sh
|
2022-09-08 19:25:02 +02:00
|
|
|
# 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
|