summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRichard Bradfield2020-05-27 09:34:15 +0100
committerRichard Bradfield2020-05-27 09:34:15 +0100
commitb7796de99f0ef87cf5bd5455c871881590aac1de (patch)
treee90e5e5dfaf3f2fa9115f0ef0c29f93b0407abb0 /PKGBUILD
parentad49c7e9b1d3943bd0bdcdc0fc227a81c5a35247 (diff)
downloadaur-b7796de99f0ef87cf5bd5455c871881590aac1de.tar.gz
Make PKGBUILD shell quoting consistent
Run shellharden to make the use of braces around variable expansion consistent, and swap the loop for installing man pages with the correct invocation of `install`.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD21
1 files changed, 9 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dbdc995e2bd3..8ab0def9af34 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,14 @@ license=("MIT")
depends=("glibc")
makedepends=("go")
optdepends=("git: To interact with repositories")
-source=("$pkgname-$pkgver.tar.gz::https://github.com/cli/cli/archive/v${pkgver}.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/cli/cli/archive/v$pkgver.tar.gz")
sha256sums=('318295e5a662f785662751f1e2cd4b1f613ec3aced1c4e7f1755d27922dbfdbf')
build() {
cd "cli-$pkgver"
go build \
-trimpath \
- -ldflags "-extldflags ${LDFLAGS} -X github.com/cli/cli/command.Version=v${pkgver} -X github.com/cli/cli/command.BuildDate=$(date +%Y-%m-%d)" -o "bin/gh" ./cmd/gh
+ -ldflags "-extldflags $LDFLAGS -X github.com/cli/cli/command.Version=v$pkgver -X github.com/cli/cli/command.BuildDate=$(date +%Y-%m-%d)" -o "bin/gh" ./cmd/gh
# Generate manpage
go run ./cmd/gen-docs --man-page --doc-path ./share/man/man1/
@@ -31,16 +31,13 @@ build() {
package() {
cd "cli-$pkgver"
- install -Dm755 "bin/gh" "${pkgdir}/usr/bin/gh"
- install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/github-cli"
- install -Dm644 "README.md" "${pkgdir}/usr/share/doc/github-cli/README.md"
+ install -Dm755 "bin/gh" "$pkgdir/usr/bin/gh"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/github-cli"
+ install -Dm644 "README.md" "$pkgdir/usr/share/doc/github-cli/README.md"
- install -Dm644 "_completions/bash" "${pkgdir}/usr/share/bash-completion/completions/gh"
- install -Dm644 "_completions/zsh" "${pkgdir}/usr/share/zsh/site-functions/_gh"
- install -Dm644 "_completions/fish" "${pkgdir}/usr/share/fish/vendor_completions.d/gh.fish"
+ install -Dm644 "_completions/bash" "$pkgdir/usr/share/bash-completion/completions/gh"
+ install -Dm644 "_completions/zsh" "$pkgdir/usr/share/zsh/site-functions/_gh"
+ install -Dm644 "_completions/fish" "$pkgdir/usr/share/fish/vendor_completions.d/gh.fish"
- mkdir -p -m755 ${pkgdir}/usr/share/man/man1
- for file in share/man/man1/*; do
- install -Dm644 "$file" "${pkgdir}/usr/share/man/man1/"
- done
+ install -Dm644 -t "$pkgdir/usr/share/man/man1/" share/man/man1/*
}