11# Downloading latest version of utPLSQL
22
3- It is quite easy to download latest version of utPLSQL from github on Unix machines.
4- Here is a little snippet that can be handy for downloading latest version.
3+ It is quite easy to download latest version of utPLSQL from github on both Unix/Linux as well as Windows machines.
4+ Below are little snippets that can be handy for downloading latest version.
5+
6+ ## Unix/Linux
7+
58``` bash
69#! /bin/bash
710# Get the url to latest release "zip" file
@@ -18,6 +21,35 @@ You may download with a one-liner if that is more convenient.
1821curl -LOk $( curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk ' /browser_download_url/ { print $2 }' | grep " .zip" | sed ' s/"//g' )
1922```
2023
24+ ##Windows
25+
26+ To run the script on windows you will need [ PowerShell 3.0] ( https://blogs.technet.microsoft.com/heyscriptingguy/2013/06/02/weekend-scripter-install-powershell-3-0-on-windows-7/ ) or above.
27+ You will also need .NET 4.0 Framework or above.
28+
29+ ``` batch
30+ $archiveName = 'utPLSQL.zip'
31+ $latestRepo = Invoke-WebRequest https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest
32+ $repo = $latestRepo.Content | Convertfrom-Json
33+
34+ $urlList = $repo.assets.browser_download_url
35+
36+ Add-Type -assembly "system.io.compression.filesystem"
37+
38+ foreach ($i in $urlList) {
39+
40+ $fileName = $i.substring($i.LastIndexOf("/") + 1)
41+
42+ if ( $fileName.substring($fileName.LastIndexOf(".") + 1) -eq 'zip' ) {
43+ Invoke-WebRequest $i -OutFile $archiveName
44+ $fileLocation = Get-ChildItem | where {$_.Name -eq $archiveName}
45+
46+ if ($fileLocation) {
47+ [io.compression.zipfile]::ExtractToDirectory($($fileLocation.FullName),$($fileLocation.DirectoryName))
48+ }
49+ }
50+ }
51+ ```
52+
2153# Headless installation
2254
2355To simply install the utPLSQL into a new database schema and grant it to public, execute the script ` install_headless.sql ` as SYSDBA.
0 commit comments