Initial Demo scripts for installation and PowerShellGet
This commit is contained in:
parent
ef32e2339e
commit
32f1e98a2c
17
demos/0-Install.sh.ps1
Normal file
17
demos/0-Install.sh.ps1
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#region Download the package from GitHub to Ubuntu (14/16)
|
||||||
|
# TODO: Update the url
|
||||||
|
# TODO: Update to apt-get, if that is available
|
||||||
|
curl https://github.com/PowerShell/PowerShell/releases/download/v0.5.0/powershell_0.5.0-1_amd64.deb
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Install PowerShell and its dependencies
|
||||||
|
# TODO: Fix the version
|
||||||
|
sudo apt-get install libunwind8 libicu52
|
||||||
|
sudo dpkg -i powershell_0.5.0-1_amd64.deb
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Launch PowerShell
|
||||||
|
# TODO: Launch a new terminal
|
||||||
|
clear
|
||||||
|
PowerShell
|
||||||
|
#endregion
|
22
demos/1-PowerShellGet.ps1
Normal file
22
demos/1-PowerShellGet.ps1
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#region Package Management
|
||||||
|
|
||||||
|
## List available package provider
|
||||||
|
Get-PackageProvider #(should show 2 providers - NuGet,PowerShellGet)
|
||||||
|
|
||||||
|
## Using PowerShellGet find and install other demos
|
||||||
|
Find-Module -Tag 'Open PowerShell','Demos' | Install-Module -Verbose
|
||||||
|
Get-Module
|
||||||
|
|
||||||
|
# Find and Download node.js from nuget.org
|
||||||
|
Find-Package -Name node.js -ProviderName NuGet -Verbose -Source http://nuget.org/api/v2
|
||||||
|
|
||||||
|
# Register trusted endpoints
|
||||||
|
Register-PackageSource -Name NuGet -Location http://nuget.org/api/v2 -Trusted -ProviderName NuGet
|
||||||
|
|
||||||
|
# Finding and installing becomes very easy
|
||||||
|
Find-Package -Name jQuery -Verbose | Install-Package -Verbose
|
||||||
|
|
||||||
|
# Discover installed packages
|
||||||
|
Get-Package -ProviderName NuGet
|
||||||
|
|
||||||
|
#endregion
|
Loading…
Reference in a new issue