diff --git a/contrib/man/md/docker-attach.md b/contrib/man/md/docker-attach.1.md similarity index 100% rename from contrib/man/md/docker-attach.md rename to contrib/man/md/docker-attach.1.md diff --git a/contrib/man/md/docker-build.md b/contrib/man/md/docker-build.1.md similarity index 100% rename from contrib/man/md/docker-build.md rename to contrib/man/md/docker-build.1.md diff --git a/contrib/man/md/docker-commit.md b/contrib/man/md/docker-commit.1.md similarity index 100% rename from contrib/man/md/docker-commit.md rename to contrib/man/md/docker-commit.1.md diff --git a/contrib/man/md/docker-cp.md b/contrib/man/md/docker-cp.1.md similarity index 100% rename from contrib/man/md/docker-cp.md rename to contrib/man/md/docker-cp.1.md diff --git a/contrib/man/md/docker-diff.md b/contrib/man/md/docker-diff.1.md similarity index 100% rename from contrib/man/md/docker-diff.md rename to contrib/man/md/docker-diff.1.md diff --git a/contrib/man/md/docker-events.md b/contrib/man/md/docker-events.1.md similarity index 100% rename from contrib/man/md/docker-events.md rename to contrib/man/md/docker-events.1.md diff --git a/contrib/man/md/docker-export.md b/contrib/man/md/docker-export.1.md similarity index 100% rename from contrib/man/md/docker-export.md rename to contrib/man/md/docker-export.1.md diff --git a/contrib/man/md/docker-history.md b/contrib/man/md/docker-history.1.md similarity index 100% rename from contrib/man/md/docker-history.md rename to contrib/man/md/docker-history.1.md diff --git a/contrib/man/md/docker-images.md b/contrib/man/md/docker-images.1.md similarity index 100% rename from contrib/man/md/docker-images.md rename to contrib/man/md/docker-images.1.md diff --git a/contrib/man/md/docker-import.md b/contrib/man/md/docker-import.1.md similarity index 100% rename from contrib/man/md/docker-import.md rename to contrib/man/md/docker-import.1.md diff --git a/contrib/man/md/docker-info.md b/contrib/man/md/docker-info.1.md similarity index 100% rename from contrib/man/md/docker-info.md rename to contrib/man/md/docker-info.1.md diff --git a/contrib/man/md/docker-inspect.md b/contrib/man/md/docker-inspect.1.md similarity index 100% rename from contrib/man/md/docker-inspect.md rename to contrib/man/md/docker-inspect.1.md diff --git a/contrib/man/md/docker-kill.md b/contrib/man/md/docker-kill.1.md similarity index 100% rename from contrib/man/md/docker-kill.md rename to contrib/man/md/docker-kill.1.md diff --git a/contrib/man/md/docker-load.md b/contrib/man/md/docker-load.1.md similarity index 100% rename from contrib/man/md/docker-load.md rename to contrib/man/md/docker-load.1.md diff --git a/contrib/man/md/docker-login.md b/contrib/man/md/docker-login.1.md similarity index 100% rename from contrib/man/md/docker-login.md rename to contrib/man/md/docker-login.1.md diff --git a/contrib/man/md/docker-logs.md b/contrib/man/md/docker-logs.1.md similarity index 100% rename from contrib/man/md/docker-logs.md rename to contrib/man/md/docker-logs.1.md diff --git a/contrib/man/md/docker-port.md b/contrib/man/md/docker-port.1.md similarity index 100% rename from contrib/man/md/docker-port.md rename to contrib/man/md/docker-port.1.md diff --git a/contrib/man/md/docker-ps.md b/contrib/man/md/docker-ps.1.md similarity index 100% rename from contrib/man/md/docker-ps.md rename to contrib/man/md/docker-ps.1.md diff --git a/contrib/man/md/docker-pull.md b/contrib/man/md/docker-pull.1.md similarity index 100% rename from contrib/man/md/docker-pull.md rename to contrib/man/md/docker-pull.1.md diff --git a/contrib/man/md/docker-push.md b/contrib/man/md/docker-push.1.md similarity index 100% rename from contrib/man/md/docker-push.md rename to contrib/man/md/docker-push.1.md diff --git a/contrib/man/md/docker-restart.md b/contrib/man/md/docker-restart.1.md similarity index 100% rename from contrib/man/md/docker-restart.md rename to contrib/man/md/docker-restart.1.md diff --git a/contrib/man/md/docker-rm.md b/contrib/man/md/docker-rm.1.md similarity index 100% rename from contrib/man/md/docker-rm.md rename to contrib/man/md/docker-rm.1.md diff --git a/contrib/man/md/docker-rmi.md b/contrib/man/md/docker-rmi.1.md similarity index 100% rename from contrib/man/md/docker-rmi.md rename to contrib/man/md/docker-rmi.1.md diff --git a/contrib/man/md/docker-run.md b/contrib/man/md/docker-run.1.md similarity index 100% rename from contrib/man/md/docker-run.md rename to contrib/man/md/docker-run.1.md diff --git a/contrib/man/md/docker-save.md b/contrib/man/md/docker-save.1.md similarity index 100% rename from contrib/man/md/docker-save.md rename to contrib/man/md/docker-save.1.md diff --git a/contrib/man/md/docker-search.md b/contrib/man/md/docker-search.1.md similarity index 100% rename from contrib/man/md/docker-search.md rename to contrib/man/md/docker-search.1.md diff --git a/contrib/man/md/docker-start.md b/contrib/man/md/docker-start.1.md similarity index 100% rename from contrib/man/md/docker-start.md rename to contrib/man/md/docker-start.1.md diff --git a/contrib/man/md/docker-stop.md b/contrib/man/md/docker-stop.1.md similarity index 100% rename from contrib/man/md/docker-stop.md rename to contrib/man/md/docker-stop.1.md diff --git a/contrib/man/md/docker-tag.md b/contrib/man/md/docker-tag.1.md similarity index 100% rename from contrib/man/md/docker-tag.md rename to contrib/man/md/docker-tag.1.md diff --git a/contrib/man/md/docker-top.md b/contrib/man/md/docker-top.1.md similarity index 100% rename from contrib/man/md/docker-top.md rename to contrib/man/md/docker-top.1.md diff --git a/contrib/man/md/docker-wait.md b/contrib/man/md/docker-wait.1.md similarity index 100% rename from contrib/man/md/docker-wait.md rename to contrib/man/md/docker-wait.1.md diff --git a/contrib/man/md/docker.md b/contrib/man/md/docker.1.md similarity index 100% rename from contrib/man/md/docker.md rename to contrib/man/md/docker.1.md diff --git a/contrib/man/md/md2man-all.sh b/contrib/man/md/md2man-all.sh index e482da647a..f33557934c 100755 --- a/contrib/man/md/md2man-all.sh +++ b/contrib/man/md/md2man-all.sh @@ -9,8 +9,14 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" pwd } -mkdir -p ../man1 - -for FILE in docker*.md; do - pandoc -s -t man "$FILE" -o "../man1/${FILE%.*}.1" +for FILE in *.md; do + base="$(basename "$FILE")" + name="${base%.md}" + num="${name##*.}" + if [ -z "$num" -o "$base" = "$num" ]; then + # skip files that aren't of the format xxxx.N.md (like README.md) + continue + fi + mkdir -p "../man${num}" + pandoc -s -t man "$FILE" -o "../man${num}/${name}" done