Skip to content

Commit 0e75ef7

Browse files
committed
Add second package which installs module as user module rather than globally
1 parent 1ee1481 commit 0e75ef7

File tree

5 files changed

+54
-1
lines changed

5 files changed

+54
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<metadata>
4+
<id>PSReadline.SingleUser</id>
5+
<version></version>
6+
<authors>Jason Shirk</authors>
7+
<owners>Jason Shirk</owners>
8+
<projectUrl>https://github.com/lzybkr/PSReadLine</projectUrl>
9+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<licenseUrl>https://raw.github.com/lzybkr/PSReadLine/master/License.txt</licenseUrl>
11+
<summary>A bash inspired readline implementation for PowerShell</summary>
12+
<description>Once installed you will likely want to change your profile.ps1 to automatically load the PSReadLine module. Please refer to the project website for instructions. Note that to upgrade or uninstall you will likely need to close all instances of PowerShell and uninstall from cmd.exe. This package installs in the installing user's local PowerShell modules.</description>
13+
<releaseNotes>https://raw.github.com/lzybkr/PSReadLine/master/Changes.txt</releaseNotes>
14+
<copyright></copyright>
15+
<tags>Powershell PS Script</tags>
16+
<dependencies>
17+
</dependencies>
18+
</metadata>
19+
<files>
20+
<file src="tools.SingleUser\**" target="tools" />
21+
<file src="PSReadline\**" target="PSReadline" />
22+
</files>
23+
</package>

ChocolateyPackage/PSReadline.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1010
<licenseUrl>https://raw.github.com/lzybkr/PSReadLine/master/License.txt</licenseUrl>
1111
<summary>A bash inspired readline implementation for PowerShell</summary>
12-
<description>Once installed you will likely want to change your profile.ps1 to automatically load the PSReadLine module. Please refer to the project website for instructions. Note that to upgrade or uninstall you will likely need to close all instances of PowerShell and uninstall from cmd.exe.</description>
12+
<description>Once installed you will likely want to change your profile.ps1 to automatically load the PSReadLine module. Please refer to the project website for instructions. Note that to upgrade or uninstall you will likely need to close all instances of PowerShell and uninstall from cmd.exe. This package installs as a global module accessible by all users.</description>
1313
<releaseNotes>https://raw.github.com/lzybkr/PSReadLine/master/Changes.txt</releaseNotes>
1414
<copyright></copyright>
1515
<tags>Powershell PS Script</tags>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$packageName = "PSReadLine"
2+
3+
try {
4+
$source = Resolve-Path ($PSScriptRoot + "\..\$packageName\")
5+
$dest = "$HOME\Documents\WindowsPowerShell\Modules\"
6+
7+
if (!(Test-Path $dest)) {
8+
mkdir $dest
9+
}
10+
11+
Copy-Item -Force -Recurse $source $dest
12+
13+
Write-ChocolateySuccess $packageName
14+
} catch {
15+
Write-ChocolateyFailure $packageName $($_.Exception.Message)
16+
throw
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$packageName = "PSReadLine"
2+
3+
try {
4+
5+
Remove-Item -Recurse -Force "$HOME\Documents\WindowsPowerShell\Modules\$packageName"
6+
7+
Write-ChocolateySuccess $packageName
8+
} catch {
9+
Write-ChocolateyFailure $packageName $($_.Exception.Message)
10+
throw
11+
}

MakeRelease.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ if (gcm cpack -ea Ignore)
5555
}
5656

5757
& $PSScriptRoot\Update-NuspecVersion.ps1 "$chocolateyDir\PSReadline.nuspec" $version
58+
& $PSScriptRoot\Update-NuspecVersion.ps1 "$chocolateyDir\PSReadline.SingleUser.nuspec" $version
5859

5960
cp -r $targetDir $chocolateyDir\PSReadline
6061

6162
cpack "$chocolateyDir\PSReadline.nuspec"
63+
cpack "$chocolateyDir\PSReadline.SingleUser.nuspec"
6264
}
6365

6466
del $PSScriptRoot\PSReadline.zip -ea Ignore

0 commit comments

Comments
 (0)