Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI:DOCS] Making docs build on mac #7457

Merged
merged 1 commit into from
Aug 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions docs/remote-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,31 @@ 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
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)
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
Expand Down