summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2022-11-07 18:59:35 +0100
committerCarl Smedstad2022-11-07 18:59:35 +0100
commit519635fc0e015adcd751142911bafaf77c498cda (patch)
tree385729e726c27a9b4d332078cd09b7ea76ba27c7
parent1de344d92681bac8f88873e895f4947bbbe2693b (diff)
downloadaur-519635fc0e015adcd751142911bafaf77c498cda.tar.gz
Fix installation of completions etc
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD4
-rw-r--r--gitlint.install28
4 files changed, 24 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1744419e2a29..83a3b650617b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gitlint
pkgdesc = Git commit message linter
pkgver = 0.17.0
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/jorisroovers/gitlint
install = gitlint.install
arch = any
@@ -19,6 +19,6 @@ pkgbase = gitlint
source = gitlint.install
sha256sums = 1c1e895aea22b1ded131a9dc81dd1f37fb064a9f3af7421debd1606ca646196a
sha256sums = ec117041e4ba8a3a46d27e169982129dd08e455501de676d873fce91b1d934cd
- sha256sums = d7b51415865e6c3802e3440462022e3b2349b1af813b5c2459e62f3c1dd2feb3
+ sha256sums = c160f586b02894afc3535de1f9c843b60bfc24d2b56cc00ab26472dc296123c4
pkgname = gitlint
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..cbdb2c0762e4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!0001-Unset-EDITOR-env-var-in-test_run_hook_edit.patch
+!gitlint.install
diff --git a/PKGBUILD b/PKGBUILD
index 6c09d77f1db5..8983ab9c6eba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=gitlint
pkgver=0.17.0
-pkgrel=3
+pkgrel=4
pkgdesc='Git commit message linter'
arch=('any')
url='https://github.com/jorisroovers/gitlint'
@@ -28,7 +28,7 @@ source=(
sha256sums=(
'1c1e895aea22b1ded131a9dc81dd1f37fb064a9f3af7421debd1606ca646196a'
'ec117041e4ba8a3a46d27e169982129dd08e455501de676d873fce91b1d934cd'
- 'd7b51415865e6c3802e3440462022e3b2349b1af813b5c2459e62f3c1dd2feb3'
+ 'c160f586b02894afc3535de1f9c843b60bfc24d2b56cc00ab26472dc296123c4'
)
install=gitlint.install
diff --git a/gitlint.install b/gitlint.install
index 9151ca4a7d10..7323f7750878 100644
--- a/gitlint.install
+++ b/gitlint.install
@@ -1,21 +1,21 @@
-post_install() {
- _GITLINT_COMPLETE=bash_source gitlint > gitlint.bash
- _GITLINT_COMPLETE=fish_source gitlint > gitlint.fish
- _GITLINT_COMPLETE=zsh_source gitlint > gitlint.zsh
+_install_completions() {
+ tmpdir=$(mktemp -d)
+
+ _GITLINT_COMPLETE=bash_source gitlint > "$tmpdir/gitlint.bash"
+ _GITLINT_COMPLETE=fish_source gitlint > "$tmpdir/gitlint.fish"
+ _GITLINT_COMPLETE=zsh_source gitlint > "$tmpdir/gitlint.zsh"
- install -Dm644 gitlint.bash "/usr/share/bash-completion/completions/gitlint"
- install -Dm644 gitlint.fish "/usr/share/fish/vendor_completions.d/gitlint.fish"
- install -Dm644 gitlint.zsh "/usr/share/zsh/site-functions/_gitlint"
+ install -Dm644 "$tmpdir/gitlint.bash" "/usr/share/bash-completion/completions/gitlint"
+ install -Dm644 "$tmpdir/gitlint.fish" "/usr/share/fish/vendor_completions.d/gitlint.fish"
+ install -Dm644 "$tmpdir/gitlint.zsh" "/usr/share/zsh/site-functions/_gitlint"
}
-post_upgrade() {
- _GITLINT_COMPLETE=bash_source gitlint > gitlint.bash
- _GITLINT_COMPLETE=fish_source gitlint > gitlint.fish
- _GITLINT_COMPLETE=zsh_source gitlint > gitlint.zsh
+post_install() {
+ _install_completions
+}
- install -Dm644 gitlint.bash "/usr/share/bash-completion/completions/gitlint"
- install -Dm644 gitlint.fish "/usr/share/fish/vendor_completions.d/gitlint.fish"
- install -Dm644 gitlint.zsh "/usr/share/zsh/site-functions/_gitlint"
+post_upgrade() {
+ _install_completions
}
post_remove() {