chore: fix windows setup inconveniences

This commit is contained in:
xeruf 2022-09-10 00:38:57 +02:00
parent 04a7665a0c
commit 7f958f394e
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
#!/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 "$@"
then choco install --limit-output "$@"
else exec powershell -Command "Start-Process 'choco' -Verb runAs -ArgumentList 'install $*'"
fi

4
i.ps1
View file

@ -1,6 +1,6 @@
# manual execution: Set-ExecutionPolicy Bypass -Scope Process -Force; .\i
(Test-Path "$PWD\instalee") -and (cd instalee)
(Test-Path "$PWD\instalee" -PathType Container) -and (cd instalee) | out-null
packages\chocolatey\powershell.ps1
Start-Process -Wait choco -Verb runAs -ArgumentList 'install git'
Start-Process -Wait "C:\Program Files\Git\git-bash.exe" -Verb runAs -ArgumentList "-c './instalee win/office; sleep 10 || bash'"
Sleep 10
# Sleep 10