Kaynağa Gözat

Merge pull request #5069 from tianon/hack-make-ubuntu-man

Add contrib/man to our generated deb
Guillaume J. Charmes 11 yıl önce
ebeveyn
işleme
7dd9c208fd
1 değiştirilmiş dosya ile 12 ekleme ve 0 silme
  1. 12 0
      hack/make/ubuntu

+ 12 - 0
hack/make/ubuntu

@@ -46,6 +46,18 @@ bundle_ubuntu() {
 	mkdir -p $DIR/etc/fish/completions
 	cp contrib/completion/fish/docker.fish $DIR/etc/fish/completions/
 
+	# Include contributed man pages
+	manRoot="$DIR/usr/share/man"
+	mkdir -p "$manRoot"
+	for manDir in contrib/man/man*; do
+		manBase="$(basename "$manDir")" # "man1"
+		for manFile in "$manDir"/*; do
+			manName="$(basename "$manFile")" # "docker-build.1"
+			mkdir -p "$manRoot/$manBase"
+			gzip -c "$manFile" > "$manRoot/$manBase/$manName.gz"
+		done
+	done
+
 	# Copy the binary
 	# This will fail if the binary bundle hasn't been built
 	mkdir -p $DIR/usr/bin