diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-07-27 02:02:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 02:02:44 +0200 |
commit | 5397a00a1cd94c0fa16f215beaa60e3f4883403c (patch) | |
tree | ab754f3af97c1101c63c509176e3d99cc9a3fbd6 /contrib/pkginstaller/scripts/postinstall | |
parent | 4277b1fdc5a2157ff3cc225ccccb7b830126b6d3 (diff) | |
parent | c35ae7640cfa9503c814869347252025a9037637 (diff) | |
download | podman-5397a00a1cd94c0fa16f215beaa60e3f4883403c.tar.gz podman-5397a00a1cd94c0fa16f215beaa60e3f4883403c.tar.bz2 podman-5397a00a1cd94c0fa16f215beaa60e3f4883403c.zip |
Merge pull request #14540 from anjannath/pkginstaller
Add support for building macOS pkg installer
Diffstat (limited to 'contrib/pkginstaller/scripts/postinstall')
-rwxr-xr-x | contrib/pkginstaller/scripts/postinstall | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/pkginstaller/scripts/postinstall b/contrib/pkginstaller/scripts/postinstall new file mode 100755 index 000000000..db17eede8 --- /dev/null +++ b/contrib/pkginstaller/scripts/postinstall @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +BZSH_PODMAN_PATH_EXP='PATH="/opt/podman/bin:$PATH"' +FISH_PODMAN_PATH_EXP='set PATH "/opt/podman/bin $PATH"' +BASHRC_PATH="$HOME/.bash_profile" +ZSHENV_PATH="$HOME/.zshenv" +ZSHRC_PATH="$HOME/.zshrc" +FSHCFG_PATH="$HOME/.config/fish/config.fish" + +# append /Applications/podman/bin to $PATH +if [ -f "$BASHRC_PATH" ]; then + grep -Fxq "$BZSH_PODMAN_PATH_EXP" "$BASHRC_PATH" || echo "$BZSH_PODMAN_PATH_EXP" >> "$BASHRC_PATH" +fi +if [ -f "$ZSHENV_PATH" ]; then + grep -Fxq "$BZSH_PODMAN_PATH_EXP" "$ZSHENV_PATH" || echo "$BZSH_PODMAN_PATH_EXP" >> "$ZSHENV_PATH" +fi +if [ -f "$ZSHRC_PATH" ]; then + grep -Fxq "$BZSH_PODMAN_PATH_EXP" "$ZSHRC_PATH" || echo "$BZSH_PODMAN_PATH_EXP" >> "$ZSHRC_PATH" +fi +if [ -f "$FSHCFG_PATH" ]; then + grep -Fxq "$FISH_PODMAN_PATH_EXP" "$FSHCFG_PATH" || echo "$FISH_PODMAN_PATH_EXP" >> "$FSHCFG_PATH" +fi + +ln -s /opt/podman/bin/podman-mac-helper /opt/podman/qemu/bin/podman-mac-helper +ln -s /opt/podman/bin/gvproxy /opt/podman/qemu/bin/gvproxy |