Merge pull request #16 from qwjyh/revert-15-qwjyh/issue3
Revert "use $PSScriptRoot #3"
This commit is contained in:
commit
f371c20d22
1 changed files with 13 additions and 10 deletions
|
@ -5,18 +5,22 @@
|
||||||
# first to run pwsh scripts
|
# first to run pwsh scripts
|
||||||
|
|
||||||
# check administration role
|
# check administration role
|
||||||
# to make symlink
|
|
||||||
#Requires -RunAsAdministrator
|
#Requires -RunAsAdministrator
|
||||||
|
|
||||||
# check pwsh version
|
# check pwsh version
|
||||||
# ≧ 7
|
# ≧ 7
|
||||||
#Requires -Version 7
|
#Requires -Version 7
|
||||||
|
|
||||||
# change working directory to git root
|
# check working directory
|
||||||
Set-Location (Join-Path $PSScriptRoot "..")
|
if (!(
|
||||||
|
(Test-Path bin) -and (Test-Path dotfiles)
|
||||||
|
)) {
|
||||||
|
Write-Warning -Message "wrong current path
|
||||||
|
please execute at repo root"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# install powershell modules
|
# install powershell modules
|
||||||
Write-Output "====Installing PSModules"
|
|
||||||
Write-Output "posh git"
|
Write-Output "posh git"
|
||||||
Install-Module -Name posh-git
|
Install-Module -Name posh-git
|
||||||
Write-Output "Pscx"
|
Write-Output "Pscx"
|
||||||
|
@ -36,17 +40,16 @@ Install-Module -Name npm-completion
|
||||||
|
|
||||||
# install scoop
|
# install scoop
|
||||||
if(!(Get-Command scoop -ErrorAction SilentlyContinue)) {
|
if(!(Get-Command scoop -ErrorAction SilentlyContinue)) {
|
||||||
Write-Output "====Installing scoop..."
|
Write-Output "Installing scoop..."
|
||||||
irm get.scoop.sh | iex
|
irm get.scoop.sh | iex
|
||||||
# install basic scoop apps
|
|
||||||
# import from exported json file
|
|
||||||
# to update the json file, execute ./bin/windows/scoop_apps/update_scoop_list.ps1
|
|
||||||
scoop import .\bin\windows\scoop_apps\scoop_minimal_apps.json
|
|
||||||
}
|
}
|
||||||
|
# install basic scoop apps
|
||||||
|
# import from exported json file
|
||||||
|
# to update the json file, execute ./bin/windows/scoop_apps/update_scoop_list.ps1
|
||||||
|
scoop import .\bin\windows\scoop_apps\scoop_minimal_apps.json
|
||||||
|
|
||||||
|
|
||||||
# make symbolic links
|
# make symbolic links
|
||||||
Write-Output "====Making Symbolic Links"
|
|
||||||
# neovim
|
# neovim
|
||||||
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\init.lua -Target (Resolve-Path .\dotfiles\neovim\init.lua) -Force
|
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\init.lua -Target (Resolve-Path .\dotfiles\neovim\init.lua) -Force
|
||||||
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lualine_setup.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lualine_setup.lua) -Force
|
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lualine_setup.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lualine_setup.lua) -Force
|
||||||
|
|
Loading…
Reference in a new issue