chore: fix windows setup inconveniences
This commit is contained in:
parent
04a7665a0c
commit
7f958f394e
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# https://stackoverflow.com/questions/43650595/is-there-a-command-to-check-if-git-bash-is-opened-in-administrator-mode/58846650#58846650
|
# 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 ]]
|
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 $*'"
|
else exec powershell -Command "Start-Process 'choco' -Verb runAs -ArgumentList 'install $*'"
|
||||||
fi
|
fi
|
4
i.ps1
4
i.ps1
|
@ -1,6 +1,6 @@
|
||||||
# manual execution: Set-ExecutionPolicy Bypass -Scope Process -Force; .\i
|
# 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
|
packages\chocolatey\powershell.ps1
|
||||||
Start-Process -Wait choco -Verb runAs -ArgumentList 'install git'
|
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'"
|
Start-Process -Wait "C:\Program Files\Git\git-bash.exe" -Verb runAs -ArgumentList "-c './instalee win/office; sleep 10 || bash'"
|
||||||
Sleep 10
|
# Sleep 10
|
Loading…
Add table
Reference in a new issue