summaryrefslogtreecommitdiff
path: root/docs/remote-docs.sh
diff options
context:
space:
mode:
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