summaryrefslogtreecommitdiff
path: root/docs/remote-docs.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-18 14:43:46 -0400
committerGitHub <noreply@github.com>2020-06-18 14:43:46 -0400
commita2661b1c25e280282d101f24ce478305622da11f (patch)
treee11030ff7429861729bf530b1589700a09c5f82c /docs/remote-docs.sh
parente6b9b3ab227729e72f52ddab94c024174ab8a442 (diff)
parent4dc934080b551b305d7e0e214d442f675f0f897c (diff)
downloadpodman-a2661b1c25e280282d101f24ce478305622da11f.tar.gz
podman-a2661b1c25e280282d101f24ce478305622da11f.tar.bz2
podman-a2661b1c25e280282d101f24ce478305622da11f.zip
Merge pull request #6673 from ashley-cui/master
[CI:DOCS] Fix remote docs
Diffstat (limited to 'docs/remote-docs.sh')
-rwxr-xr-xdocs/remote-docs.sh26
1 files changed, 21 insertions, 5 deletions
diff --git a/docs/remote-docs.sh b/docs/remote-docs.sh
index 1440b0926..4774b94a3 100755
--- a/docs/remote-docs.sh
+++ b/docs/remote-docs.sh
@@ -79,11 +79,6 @@ function pub_pages() {
$publisher $f
done
- # rename podman-remote.ext to podman.ext and copy
- local remote=$(echo $TARGET/podman-remote.*)
- local ext=${remote##*.}
- cp -f $remote $TARGET/podman.$ext
-
for c in "container" "image" "pod" "volume" ""; do
local cmd=${c:+-$c}
for s in $($PODMAN $c --help | sed -n '/^Available Commands:/,/^Flags:/p' | sed -e '1d;$d' -e '/^$/d' | awk '{print $1}'); do
@@ -92,6 +87,26 @@ function pub_pages() {
done
}
+## rename renames podman-remote.ext to podman.ext, and fixes up contents to reflect change
+function rename (){
+ if [[ "$PLATFORM" != linux ]]; then
+ local remote=$(echo $TARGET/podman-remote.*)
+ 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)
+ case $PLATFORM in
+ darwin|linux)
+ $(sed -i "s/Podman\\\*-remote/Podman\ for\ Mac/g" $TARGET/podman.$ext)
+ ;;
+ windows)
+ $(sed -i "s/Podman\\\*-remote/Podman\ for\ Windows/g" $TARGET/podman.$ext)
+ ;;
+ esac
+ fi
+}
+
## walk the SOURCES for markdown sources
mkdir -p $TARGET
for s in $SOURCES; do
@@ -101,3 +116,4 @@ for s in $SOURCES; do
echo >&2 "Warning: $s does not exist"
fi
done
+rename