summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordszryan2020-10-07 16:24:32 +1100
committerdszryan2020-10-07 16:24:32 +1100
commitbaf3421e9cf73d83740d238f5f832f7486657bc9 (patch)
treea0d55f4fc5d426f0e9501b4843c477a8f4bc2f74
parent0954d608d9980f320ebd234d34de4353634f5bf9 (diff)
downloadaur-baf3421e9cf73d83740d238f5f832f7486657bc9.tar.gz
copy GIST_ID config if present
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD19
3 files changed, 15 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba02022d60a7..124fa67c301b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pacmanity-git
pkgdesc = Keeps a list of installed packages in a Gist at your GitHub account
pkgver = 3.0.1
- pkgrel = 3
+ pkgrel = 4
epoch = 1
url = https://github.com/DerekTBrown/pacmanity
arch = x86_64
@@ -11,7 +11,7 @@ pkgbase = pacmanity-git
depends = pacman>=5.0
depends = gist>=4.5.0
conflicts = pacmanity
- source = pacmanity-git::git+https://github.com/DerekTBrown/pacmanity.git#branch=master
+ source = pacmanity::git+https://github.com/DerekTBrown/pacmanity.git#branch=master
sha256sums = SKIP
pkgname = pacmanity-git
diff --git a/.gitignore b/.gitignore
index 76987a7a815c..3cc7132b0e2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,4 @@
*.xz
src/
pkg/
-pacmanity-git/
+pacmanity/
diff --git a/PKGBUILD b/PKGBUILD
index c771bf6556c8..30f04972b569 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: dszryan
pkgname=pacmanity-git
pkgver=3.0.1
-pkgrel=3
+pkgrel=4
epoch=1
pkgdesc="Keeps a list of installed packages in a Gist at your GitHub account"
arch=('x86_64' 'i686')
@@ -11,24 +11,29 @@ license=('GPL')
depends=('pacman>=5.0' 'gist>=4.5.0')
makedepends=('git')
conflicts=('pacmanity')
-source=("$pkgname::git+https://github.com/DerekTBrown/${pkgname/-git/}.git#branch=master")
+source=("${pkgname/-git/}::git+https://github.com/DerekTBrown/${pkgname/-git/}.git#branch=master")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgname/-git/}"
git describe --all --exact-match `git rev-parse HEAD` | sed "s|tags/||g"
}
package() {
# install
mkdir -p "$pkgdir/etc" "$pkgdir/usr/lib/pacmanity" "$pkgdir/usr/share/libalpm/hooks"
- touch "$pkgdir/etc/pacmanity"
- install -m774 "$srcdir/$pkgname/src/pacmanity.sh" "$pkgdir/usr/lib/pacmanity/pacmanity.sh"
- install -m664 "$srcdir/$pkgname/src/pacmanity.hook" "$pkgdir/usr/share/libalpm/hooks/zzz-pacmanity.hook"
+ install -m774 "$srcdir/${pkgname/-git/}/src/pacmanity.sh" "$pkgdir/usr/lib/pacmanity/pacmanity.sh"
+ install -m664 "$srcdir/${pkgname/-git/}/src/pacmanity.hook" "$pkgdir/usr/share/libalpm/hooks/zzz-pacmanity.hook"
+ if [[ -f "/etc/pacmanity" ]]; then
+ install -m664 "/etc/pacmanity" "$pkgdir/etc/pacmanity"
+ sudo rm -f "/etc/pacmanity"
+ else
+ touch "$pkgdir/etc/pacmanity"
+ fi
# run
. $pkgdir/usr/lib/pacmanity/pacmanity.sh
- if [[ -z "$GIST_ID" ]]; then
+ if [[ -z "$GIST_ID" ]]; then
pacmanity_install
else
pacmanity_update