diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-08-27 08:11:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 08:11:33 -0400 |
commit | 7d3cadcc54cbad9a109471f586c10541544bc7db (patch) | |
tree | 471e91a72e0360395eb09ffc6bd476ed046c22a0 /docs | |
parent | d6b03772ad35eca82fb144a9d69ea16dcc44e183 (diff) | |
parent | 7e004755bf4a1fd281993ef1340c29985fe329ff (diff) | |
download | podman-7d3cadcc54cbad9a109471f586c10541544bc7db.tar.gz podman-7d3cadcc54cbad9a109471f586c10541544bc7db.tar.bz2 podman-7d3cadcc54cbad9a109471f586c10541544bc7db.zip |
Merge pull request #7457 from ashley-cui/macdocs
[CI:DOCS] Making docs build on mac
Diffstat (limited to 'docs')
-rwxr-xr-x | docs/remote-docs.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/docs/remote-docs.sh b/docs/remote-docs.sh index 6d520fae6..183399b71 100755 --- a/docs/remote-docs.sh +++ b/docs/remote-docs.sh @@ -88,6 +88,16 @@ function pub_pages() { done } +## sed syntax is different on darwin and linux +## sed --help fails on mac, meaning we have to use mac syntax +function sed_os(){ + if sed --help > /dev/null 2>&1 ; then + $(sed -i "$@") + else + $(sed -i "" "$@") + fi +} + ## rename renames podman-remote.ext to podman.ext, and fixes up contents to reflect change function rename (){ if [[ "$PLATFORM" != linux ]]; then @@ -95,14 +105,14 @@ function rename (){ local ext=${remote##*.} mv $remote $TARGET/podman.$ext - $(sed -i "s/podman\\\*-remote/podman/g" $TARGET/podman.$ext) - $(sed -i "s/A\ remote\ CLI\ for\ Podman\:\ //g" $TARGET/podman.$ext) + sed_os "s/podman\\\*-remote/podman/g" $TARGET/podman.$ext + sed_os "s/A\ remote\ CLI\ for\ Podman\:\ //g" $TARGET/podman.$ext case $PLATFORM in darwin|linux) - $(sed -i "s/Podman\\\*-remote/Podman\ for\ Mac/g" $TARGET/podman.$ext) + sed_os "s/Podman\\\*-remote/Podman\ for\ Mac/g" $TARGET/podman.$ext ;; windows) - $(sed -i "s/Podman\\\*-remote/Podman\ for\ Windows/g" $TARGET/podman.$ext) + sed_os "s/Podman\\\*-remote/Podman\ for\ Windows/g" $TARGET/podman.$ext ;; esac fi |