summaryrefslogtreecommitdiff
path: root/docs/remote-docs.sh
diff options
context:
space:
mode:
authorAshley Cui <acui@redhat.com>2020-06-18 12:01:08 -0400
committerAshley Cui <acui@redhat.com>2020-06-18 12:13:46 -0400
commit4dc934080b551b305d7e0e214d442f675f0f897c (patch)
treee11030ff7429861729bf530b1589700a09c5f82c /docs/remote-docs.sh
parente6b9b3ab227729e72f52ddab94c024174ab8a442 (diff)
downloadpodman-4dc934080b551b305d7e0e214d442f675f0f897c.tar.gz
podman-4dc934080b551b305d7e0e214d442f675f0f897c.tar.bz2
podman-4dc934080b551b305d7e0e214d442f675f0f897c.zip
Fix remote docs
Fix renaming bug in remote-docs.sh Remove mentions of 'remote' in windows and mac dos Remove podman-remote.conf.5 Signed-off-by: Ashley Cui <acui@redhat.com>
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