Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Adding -notInteractive flag to deploy.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
rpeach-sag committed May 3, 2018
1 parent d954151 commit 687219a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion misc/deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
:: See the License for the specific language governing permissions and
:: limitations under the License.

Powershell.exe -ExecutionPolicy remotesigned -File ".\misc\deploy.ps1"
Powershell.exe -ExecutionPolicy remotesigned -File ".\misc\deploy.ps1" %*
23 changes: 17 additions & 6 deletions misc/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,27 @@
# limitations under the License.

param (
[string]$sagInstallDir = (& "$(Split-Path $MyInvocation.MyCommand.Path -Parent)\getSagInstallDir")
[string]$sagInstallDir,
[switch]$notInteractive
)

if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }

$temp = Read-Host "Where is your SoftwareAG install folder? (blank=$sagInstallDir)"
if (!$sagInstallDir) {
$sagInstallDir = (& "$(Split-Path $MyInvocation.MyCommand.Path -Parent)\getSagInstallDir")

if (!$notInteractive) {
$temp = Read-Host "Where is your SoftwareAG install folder? (blank=$sagInstallDir)"
}

if (-not $temp) {} else {
$sagInstallDir = $temp;
if (-not $temp) {} else {
$sagInstallDir = $temp;
}
}

$apamaInstallDir = "$sagInstallDir\Apama"
if (-not (Test-Path $apamaInstallDir)) {
Throw "Could not find Apama Installation"
Throw "Could not find Apama Installation: $sagInstallDir\Apama"
}

$rxEplHome = (Resolve-Path "$PSScriptRoot\..") -replace "\\","/"
Expand All @@ -37,4 +44,8 @@ $steFile | Out-File -encoding utf8 "$sagInstallDir/Designer/extensions/rxepl.ste

[IO.File]::WriteAllLines("$rxEplHome\rxepl.properties", "RX_EPL_HOME=$rxEplHome")

Read-Host -Prompt "Done! Please restart designer. Press Return to exit..."
if ($notInteractive) {
Write-Host "Done! Please restart designer."
} else {
Read-Host -Prompt "Done! Please restart designer. Press Return to exit..."
}

0 comments on commit 687219a

Please sign in to comment.