-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f15293b
commit 6de5cc6
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
$CONFIG = "install.conf.yaml" | ||
$DOTBOT_DIR = "dotbot" | ||
|
||
$DOTBOT_BIN = "bin/dotbot" | ||
$BASEDIR = $PSScriptRoot | ||
|
||
Set-Location $BASEDIR | ||
git -C $DOTBOT_DIR submodule sync --quiet --recursive | ||
git submodule update --init --recursive $DOTBOT_DIR | ||
|
||
foreach ($PYTHON in ('python', 'python3', 'python2')) { | ||
# Python redirects to Microsoft Store in Windows 10 when not installed | ||
if (& { $ErrorActionPreference = "SilentlyContinue" | ||
![string]::IsNullOrEmpty((&$PYTHON -V)) | ||
$ErrorActionPreference = "Stop" }) { | ||
&$PYTHON $(Join-Path $BASEDIR -ChildPath $DOTBOT_DIR | Join-Path -ChildPath $DOTBOT_BIN) -d $BASEDIR -c $CONFIG $Args | ||
return | ||
} | ||
} | ||
Write-Error "Error: Cannot find Python." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
$CONFIG = "install.conf.yaml" | ||
$DOTBOT_DIR = "dotbot" | ||
|
||
$DOTBOT_BIN = "bin/dotbot" | ||
$BASEDIR = $PSScriptRoot | ||
|
||
Set-Location $BASEDIR | ||
|
||
Set-Location $DOTBOT_DIR && git submodule update --init --recursive | ||
foreach ($PYTHON in ('python', 'python3', 'python2')) { | ||
# Python redirects to Microsoft Store in Windows 10 when not installed | ||
if (& { $ErrorActionPreference = "SilentlyContinue" | ||
![string]::IsNullOrEmpty((&$PYTHON -V)) | ||
$ErrorActionPreference = "Stop" }) { | ||
&$PYTHON $(Join-Path $BASEDIR -ChildPath $DOTBOT_DIR | Join-Path -ChildPath $DOTBOT_BIN) -d $BASEDIR -c $CONFIG $Args | ||
return | ||
} | ||
} | ||
Write-Error "Error: Cannot find Python." |