github.com/containers/podman/v5@v5.1.0-rc1/hack/xref-docker-options (about) 1 #!/bin/bash 2 # 3 # Compare against docker options, see what (if anything) podman is missing. 4 # 5 6 # Hardcoded list of options we don't want to show. Some of these are 7 # implemented in podman but hidden (so of course not in man pages); 8 # some are not implemented and never will be (swarm). 9 declare -a hidden=( 10 "docker --config" # Hidden 11 "docker --context" # Hidden 12 "docker --debug" # Hidden 13 "docker --host" # Hidden 14 "docker -D" # Hidden 15 "docker -H" # Hidden 16 17 "docker .* --gpus" # Not likely to be implemented 18 "docker .* --isolation" # Only for Windows containers 19 "docker .* --kernel-memory" # CGroupsV1 only, present but hidden 20 "docker .* --link" # Deprecated in docker 21 "docker .* --runtime" # Global option under podman 22 "docker .* --storage-opt" # Global option under podman 23 24 "docker (container|image) ls" # Hidden alias to list 25 "docker context" # Hidden 26 27 # Hidden 28 "docker (container |)logs --details" 29 "docker manifest (create|inspect|push) --insecure" 30 "docker manifest inspect --verbose" 31 "docker manifest push --purge" 32 "docker run --dns-option" 33 34 # None of these will ever be implemented 35 "docker (node|plugin|service|stack|swarm)" 36 ) 37 IFS='|' hidden_re="${hidden[*]}" 38 39 XREF_SCRIPT=hack/xref-helpmsgs-manpages 40 TMP_SCRIPT=${XREF_SCRIPT}-docker 41 42 cp $XREF_SCRIPT $TMP_SCRIPT 43 44 # docker --help differs from podman --help 45 DIFF="diff --git a/$TMP_SCRIPT b/hack/$TMP_SCRIPT 46 index de9ef8630..b9e4bd0ef 100755 47 --- a/$TMP_SCRIPT 48 +++ b/$TMP_SCRIPT 49 @@ -230,8 +230,8 @@ sub podman_help { 50 # .... 51 # 52 # Start by identifying the section we're in... 53 - if (\$line =~ /^Available\\s+(Commands):/) { 54 - \$section = lc \$1; 55 + if (\$line =~ /^(Available|Management\\s+)?(Commands):/) { 56 + \$section = lc \$2; 57 } 58 elsif (\$line =~ /^(Options):/) { 59 \$section = lc \$1; 60 " 61 62 patch --quiet -p1 <<<"$DIFF" 63 64 # Sometimes this produces no output at all. Likely cause is that you 65 # have inconsistent .md files, solution is 'make docs'. If that doesn't 66 # work, remove the '2>&1 \' from the line below and rerun. I don't feel 67 # it's worth the time to improve the error handling here. 68 PODMAN=/usr/bin/docker $TMP_SCRIPT 2>&1 \ 69 | sed -ne 's/^.*podman \+\(.*\) --help. lists .\(.*\)., which is not.*/- [ ] docker \1 \2/p' \ 70 | sed -e 's/ \+/ /g' \ 71 | grep -vE "($hidden_re)\$" 72 73 rm -f $TMP_SCRIPT