summaryrefslogtreecommitdiff
path: root/contrib/msi/podman.bat
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-12 19:44:35 +0200
committerGitHub <noreply@github.com>2019-09-12 19:44:35 +0200
commitaf8fedcc78674d71d43ca3000438c42b7b6b6994 (patch)
tree1eae01c8a102de8495ec7b3244a67748a3bbe5bc /contrib/msi/podman.bat
parent8c3349bc08b6f4e48751f61dd342cbf9828eca85 (diff)
parent046c081ed0a321ac34fe0fc713ad33a926efb48e (diff)
downloadpodman-af8fedcc78674d71d43ca3000438c42b7b6b6994.tar.gz
podman-af8fedcc78674d71d43ca3000438c42b7b6b6994.tar.bz2
podman-af8fedcc78674d71d43ca3000438c42b7b6b6994.zip
Merge pull request #3999 from jwhonce/wip/msi
Support building Windows msi file
Diffstat (limited to 'contrib/msi/podman.bat')
-rw-r--r--contrib/msi/podman.bat43
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/msi/podman.bat b/contrib/msi/podman.bat
new file mode 100644
index 000000000..091c1c4c4
--- /dev/null
+++ b/contrib/msi/podman.bat
@@ -0,0 +1,43 @@
+@echo off
+setlocal enableextensions
+
+title Podman
+
+:: If remote-host is given on command line -- use it
+setlocal enabledelayedexpansion
+for %%a in (%*) do (
+ echo "%%a" |find "--remote-host" >NUL
+ if !errorlevel! == 0 (
+ goto run_podman
+ )
+)
+
+:: If PODMAN_VARLINK_BRIDGE is set -- use it
+if defined PODMAN_VARLINK_BRIDGE (
+ goto run_podman
+)
+
+:: If the configuration file exists -- use it
+set config_home=%USERPROFILE%\AppData\podman
+set config_file=%config_home%\podman-remote.conf
+if exist "%config_file%" (
+ goto run_podman
+)
+
+:: Get connection information from user and build configuration file
+md "%config_home%"
+set /p host="Please enter the remote hosts name or IP address: "
+set /p user="Please enter the remote user name: "
+(
+ echo [connections]
+ echo [connections."%host%"]
+ echo destination = "%host%"
+ echo username = "%user%"
+ echo default = true
+) >"%config_file%"
+
+:run_podman
+endlocal
+podman-remote-windows.exe %*
+
+:End