[pacman-dev,2/3] Ensure better text editor automatic filetype detection

Message ID 20180503041022.18846-2-eschwartz@archlinux.org
State Accepted, archived
Headers show
Series [pacman-dev,1/3] Remove all modelines from the project | expand

Commit Message

Eli Schwartz May 3, 2018, 4:10 a.m. UTC
Since we no longer use vim-specific modelines, use the .asciidoc file
extension which is, well, reserved for asciidoc formatted files. This
should presumably work everywhere without needing editor-specific
workarounds and configuration.

Also add a shebang to makepkg.conf to indicate it contains bash content.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 doc/{BUILDINFO.5.txt => BUILDINFO.5.asciidoc} |  2 +-
 doc/Makefile.am                               | 68 +++++++++----------
 doc/{PKGBUILD.5.txt => PKGBUILD.5.asciidoc}   |  2 +-
 ...alpm-hooks.5.txt => alpm-hooks.5.asciidoc} |  2 +-
 doc/{footer.txt => footer.asciidoc}           |  0
 doc/{index.txt => index.asciidoc}             |  0
 doc/{libalpm.3.txt => libalpm.3.asciidoc}     |  2 +-
 ...late.1.txt => makepkg-template.1.asciidoc} |  2 +-
 doc/{makepkg.8.txt => makepkg.8.asciidoc}     |  2 +-
 ...pkg.conf.5.txt => makepkg.conf.5.asciidoc} |  2 +-
 ...pacman-key.8.txt => pacman-key.8.asciidoc} |  2 +-
 doc/{pacman.8.txt => pacman.8.asciidoc}       |  2 +-
 ...cman.conf.5.txt => pacman.conf.5.asciidoc} |  2 +-
 doc/{pkgdelta.8.txt => pkgdelta.8.asciidoc}   |  2 +-
 doc/{repo-add.8.txt => repo-add.8.asciidoc}   |  2 +-
 ...atches.txt => submitting-patches.asciidoc} |  0
 ...ion-help.txt => translation-help.asciidoc} |  0
 doc/{vercmp.8.txt => vercmp.8.asciidoc}       |  2 +-
 etc/makepkg.conf.in                           |  1 +
 19 files changed, 48 insertions(+), 47 deletions(-)
 rename doc/{BUILDINFO.5.txt => BUILDINFO.5.asciidoc} (98%)
 rename doc/{PKGBUILD.5.txt => PKGBUILD.5.asciidoc} (99%)
 rename doc/{alpm-hooks.5.txt => alpm-hooks.5.asciidoc} (99%)
 rename doc/{footer.txt => footer.asciidoc} (100%)
 rename doc/{index.txt => index.asciidoc} (100%)
 rename doc/{libalpm.3.txt => libalpm.3.asciidoc} (96%)
 rename doc/{makepkg-template.1.txt => makepkg-template.1.asciidoc} (99%)
 rename doc/{makepkg.8.txt => makepkg.8.asciidoc} (99%)
 rename doc/{makepkg.conf.5.txt => makepkg.conf.5.asciidoc} (99%)
 rename doc/{pacman-key.8.txt => pacman-key.8.asciidoc} (99%)
 rename doc/{pacman.8.txt => pacman.8.asciidoc} (99%)
 rename doc/{pacman.conf.5.txt => pacman.conf.5.asciidoc} (99%)
 rename doc/{pkgdelta.8.txt => pkgdelta.8.asciidoc} (97%)
 rename doc/{repo-add.8.txt => repo-add.8.asciidoc} (99%)
 rename doc/{submitting-patches.txt => submitting-patches.asciidoc} (100%)
 rename doc/{translation-help.txt => translation-help.asciidoc} (100%)
 rename doc/{vercmp.8.txt => vercmp.8.asciidoc} (98%)

Patch

diff --git a/doc/BUILDINFO.5.txt b/doc/BUILDINFO.5.asciidoc
similarity index 98%
rename from doc/BUILDINFO.5.txt
rename to doc/BUILDINFO.5.asciidoc
index b7a72831..1821f012 100644
--- a/doc/BUILDINFO.5.txt
+++ b/doc/BUILDINFO.5.asciidoc
@@ -64,4 +64,4 @@  See Also
 --------
 linkman:makepkg[8], linkman:pacman[8], linkman:makepkg.conf[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3eff9194..8dec4ab1 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -47,24 +47,24 @@  HTML_DOCS = \
 EXTRA_DIST = \
 	asciidoc.conf \
 	asciidoc-override.css \
-	alpm-hooks.5.txt \
-	pacman.8.txt \
-	makepkg.8.txt \
-	makepkg-template.1.txt \
-	repo-add.8.txt \
-	vercmp.8.txt \
-	pkgdelta.8.txt \
-	pacman-key.8.txt \
-	PKGBUILD.5.txt \
+	alpm-hooks.5.asciidoc \
+	pacman.8.asciidoc \
+	makepkg.8.asciidoc \
+	makepkg-template.1.asciidoc \
+	repo-add.8.asciidoc \
+	vercmp.8.asciidoc \
+	pkgdelta.8.asciidoc \
+	pacman-key.8.asciidoc \
+	PKGBUILD.5.asciidoc \
 	PKGBUILD-example.txt \
-	makepkg.conf.5.txt \
-	pacman.conf.5.txt \
-	BUILDINFO.5.txt \
-	libalpm.3.txt \
-	footer.txt \
-	index.txt \
-	submitting-patches.txt \
-	translation-help.txt \
+	makepkg.conf.5.asciidoc \
+	pacman.conf.5.asciidoc \
+	BUILDINFO.5.asciidoc \
+	libalpm.3.asciidoc \
+	footer.asciidoc \
+	index.asciidoc \
+	submitting-patches.asciidoc \
+	translation-help.asciidoc \
 	Doxyfile \
 	$(ASCIIDOC_MANS) \
 	$(DOXYGEN_MANS)
@@ -130,11 +130,11 @@  A2X_OPTS = \
 	--xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
 
 # These rules are due to the includes and files of the asciidoc text
-$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile.am
-	$(AM_V_GEN)a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.txt
+$(ASCIIDOC_MANS): asciidoc.conf footer.asciidoc Makefile.am
+	$(AM_V_GEN)a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.asciidoc
 
-%.html: %.txt
-	$(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - $*.txt | \
+%.html: %.asciidoc
+	$(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - $*.asciidoc | \
 		sed -e 's/\r$$//' > $@
 
 HACKING.html: ../HACKING
@@ -142,7 +142,7 @@  HACKING.html: ../HACKING
 		sed -e 's/\r$$//' > $@
 
 # Customizations for certain HTML docs
-$(HTML_MANPAGES): asciidoc.conf footer.txt Makefile.am
+$(HTML_MANPAGES): asciidoc.conf footer.asciidoc Makefile.am
 $(HTML_OTHER): asciidoc.conf Makefile.am
 %.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons -a max-width=960px -a stylesheet=asciidoc-override.css
 %.8.html: ASCIIDOC_OPTS += -d manpage
@@ -150,18 +150,18 @@  $(HTML_OTHER): asciidoc.conf Makefile.am
 %.3.html: ASCIIDOC_OPTS += -d manpage
 
 # Dependency rules
-alpm-hooks.5 alpm-hooks.5.html: alpm-hooks.5.txt
-pacman.8 pacman.8.html: pacman.8.txt
-makepkg.8 makepkg.8.html: makepkg.8.txt
-makepkg-template.1 makepkg-template.1.html: makepkg-template.1.txt
-repo-add.8 repo-add.8.html: repo-add.8.txt
-vercmp.8 vercmp.8.html: vercmp.8.txt
-pkgdelta.8 pkgdelta.8.html: pkgdelta.8.txt
-pacman-key.8 pacman-key.8.html: pacman-key.8.txt
-PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
-makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
-pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
-libalpm.3 libalpm.3.html: libalpm.3.txt
+alpm-hooks.5 alpm-hooks.5.html: alpm-hooks.5.asciidoc
+pacman.8 pacman.8.html: pacman.8.asciidoc
+makepkg.8 makepkg.8.html: makepkg.8.asciidoc
+makepkg-template.1 makepkg-template.1.html: makepkg-template.1.asciidoc
+repo-add.8 repo-add.8.html: repo-add.8.asciidoc
+vercmp.8 vercmp.8.html: vercmp.8.asciidoc
+pkgdelta.8 pkgdelta.8.html: pkgdelta.8.asciidoc
+pacman-key.8 pacman-key.8.html: pacman-key.8.asciidoc
+PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.asciidoc PKGBUILD-example.txt
+makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.asciidoc
+pacman.conf.5 pacman.conf.5.html: pacman.conf.5.asciidoc
+libalpm.3 libalpm.3.html: libalpm.3.asciidoc
 # this one is just a symlink
 repo-remove.8: repo-add.8
 	$(RM) repo-remove.8
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.asciidoc
similarity index 99%
rename from doc/PKGBUILD.5.txt
rename to doc/PKGBUILD.5.asciidoc
index 795dde45..9634bd15 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.asciidoc
@@ -522,4 +522,4 @@  See Also
 --------
 linkman:makepkg[8], linkman:pacman[8], linkman:makepkg.conf[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/alpm-hooks.5.txt b/doc/alpm-hooks.5.asciidoc
similarity index 99%
rename from doc/alpm-hooks.5.txt
rename to doc/alpm-hooks.5.asciidoc
index eb56054e..1d19f96e 100644
--- a/doc/alpm-hooks.5.txt
+++ b/doc/alpm-hooks.5.asciidoc
@@ -125,4 +125,4 @@  or not they were actually present on the file system before package removal.
 PostTransaction hooks will *not* run if the transaction fails to complete for
 any reason.
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/footer.txt b/doc/footer.asciidoc
similarity index 100%
rename from doc/footer.txt
rename to doc/footer.asciidoc
diff --git a/doc/index.txt b/doc/index.asciidoc
similarity index 100%
rename from doc/index.txt
rename to doc/index.asciidoc
diff --git a/doc/libalpm.3.txt b/doc/libalpm.3.asciidoc
similarity index 96%
rename from doc/libalpm.3.txt
rename to doc/libalpm.3.asciidoc
index e75fb880..79ea5409 100644
--- a/doc/libalpm.3.txt
+++ b/doc/libalpm.3.asciidoc
@@ -34,4 +34,4 @@  See Also
 linkman:alpm-hooks[5], linkman:makepkg[8], linkman:pacman[8],
 linkman:pacman.conf[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/makepkg-template.1.txt b/doc/makepkg-template.1.asciidoc
similarity index 99%
rename from doc/makepkg-template.1.txt
rename to doc/makepkg-template.1.asciidoc
index fcb19b07..1cf39fb2 100644
--- a/doc/makepkg-template.1.txt
+++ b/doc/makepkg-template.1.asciidoc
@@ -115,4 +115,4 @@  See Also
 --------
 linkman:makepkg[8], linkman:PKGBUILD[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.asciidoc
similarity index 99%
rename from doc/makepkg.8.txt
rename to doc/makepkg.8.asciidoc
index 58e9b27a..b15e3a67 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.asciidoc
@@ -346,4 +346,4 @@  See Also
 --------
 linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.asciidoc
similarity index 99%
rename from doc/makepkg.conf.5.txt
rename to doc/makepkg.conf.5.asciidoc
index a9246af5..5f9fd02e 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.asciidoc
@@ -266,4 +266,4 @@  See Also
 --------
 linkman:makepkg[8], linkman:pacman[8], linkman:PKGBUILD[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/pacman-key.8.txt b/doc/pacman-key.8.asciidoc
similarity index 99%
rename from doc/pacman-key.8.txt
rename to doc/pacman-key.8.asciidoc
index 0b46f919..f0b5ac08 100644
--- a/doc/pacman-key.8.txt
+++ b/doc/pacman-key.8.asciidoc
@@ -142,4 +142,4 @@  See Also
 --------
 linkman:pacman[8], linkman:pacman.conf[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/pacman.8.txt b/doc/pacman.8.asciidoc
similarity index 99%
rename from doc/pacman.8.txt
rename to doc/pacman.8.asciidoc
index ebe16e61..b6f4dd76 100644
--- a/doc/pacman.8.txt
+++ b/doc/pacman.8.asciidoc
@@ -565,4 +565,4 @@  See Also
 linkman:alpm-hooks[5], linkman:libalpm[3], linkman:makepkg[8],
 linkman:pacman.conf[5]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/pacman.conf.5.txt b/doc/pacman.conf.5.asciidoc
similarity index 99%
rename from doc/pacman.conf.5.txt
rename to doc/pacman.conf.5.asciidoc
index db8fe740..e5fffecf 100644
--- a/doc/pacman.conf.5.txt
+++ b/doc/pacman.conf.5.asciidoc
@@ -368,4 +368,4 @@  See Also
 --------
 linkman:pacman[8], linkman:libalpm[3]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/pkgdelta.8.txt b/doc/pkgdelta.8.asciidoc
similarity index 97%
rename from doc/pkgdelta.8.txt
rename to doc/pkgdelta.8.asciidoc
index 6d93a67a..412e607e 100644
--- a/doc/pkgdelta.8.txt
+++ b/doc/pkgdelta.8.asciidoc
@@ -50,4 +50,4 @@  See Also
 --------
 linkman:pacman[8], linkman:xdelta3[1]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/repo-add.8.txt b/doc/repo-add.8.asciidoc
similarity index 99%
rename from doc/repo-add.8.txt
rename to doc/repo-add.8.asciidoc
index 4c6d8d5a..945fff75 100644
--- a/doc/repo-add.8.txt
+++ b/doc/repo-add.8.asciidoc
@@ -91,4 +91,4 @@  See Also
 --------
 linkman:makepkg[8], linkman:pacman[8], linkman:pkgdelta[8]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/doc/submitting-patches.txt b/doc/submitting-patches.asciidoc
similarity index 100%
rename from doc/submitting-patches.txt
rename to doc/submitting-patches.asciidoc
diff --git a/doc/translation-help.txt b/doc/translation-help.asciidoc
similarity index 100%
rename from doc/translation-help.txt
rename to doc/translation-help.asciidoc
diff --git a/doc/vercmp.8.txt b/doc/vercmp.8.asciidoc
similarity index 98%
rename from doc/vercmp.8.txt
rename to doc/vercmp.8.asciidoc
index f8328a6b..88021674 100644
--- a/doc/vercmp.8.txt
+++ b/doc/vercmp.8.asciidoc
@@ -69,4 +69,4 @@  See Also
 --------
 linkman:pacman[8], linkman:makepkg[8], linkman:libalpm[3]
 
-include::footer.txt[]
+include::footer.asciidoc[]
diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 3c3d4767..4382bea3 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -1,3 +1,4 @@ 
+#!/hint/bash
 #
 # @sysconfdir@/makepkg.conf
 #