Skip to content

Commit b1b58d0

Browse files
committed
add script to build package as dir
1 parent 3192b22 commit b1b58d0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

bin/Build-Folder.ps1

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
param([switch]$Release)
2+
3+
$script:thisDir = split-path $MyInvocation.MyCommand.Path -parent
4+
5+
. (join-path $script:thisDir "Config.ps1")
6+
7+
if(!$?){
8+
write-error "Could not read config."
9+
exit 1
10+
}
11+
12+
# copy to local folder
13+
push-location $thisDir
14+
push-location '..'
15+
$installedPackages = (GetConfigValue 'global-win' 'installed-packages')
16+
write-output "copying files..."
17+
# TODO: Perhaps we should delete the folder first.
18+
copy-item * -recurse -force -exclude ".git" "$installedPackages/../Packages/PowerShell"
19+
pop-location
20+
pop-location
21+
22+
write-output "restarting editor... bye!"
23+
start-sleep -milliseconds 100
24+
get-process "sublime_text" | stop-process
25+
start-sleep -milliseconds 250
26+
# sss
27+
$editor = (GetConfigValue 'global-win' 'editor')
28+
if(!$?){
29+
write-error "Could not locate editor command."
30+
exit 1
31+
}
32+
33+
&$editor

0 commit comments

Comments
 (0)