diff --git a/misc/deploy.bat b/misc/deploy.bat index eb8f7d2..1c7cf38 100644 --- a/misc/deploy.bat +++ b/misc/deploy.bat @@ -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" \ No newline at end of file +Powershell.exe -ExecutionPolicy remotesigned -File ".\misc\deploy.ps1" %* \ No newline at end of file diff --git a/misc/deploy.ps1 b/misc/deploy.ps1 index 5d92d23..f0d7686 100644 --- a/misc/deploy.ps1 +++ b/misc/deploy.ps1 @@ -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 "\\","/" @@ -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..." \ No newline at end of file +if ($notInteractive) { + Write-Host "Done! Please restart designer." +} else { + Read-Host -Prompt "Done! Please restart designer. Press Return to exit..." +} \ No newline at end of file