summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordszryan2020-10-07 23:56:38 +1100
committerdszryan2020-10-07 23:56:38 +1100
commit1a1f65b32e7daa4580a3d67176410d6b75728ed4 (patch)
tree9fe1a88385f8294cf83c61889bb49aea2dcbbf85
parentc772b05ffaf8b84a7a48acf04b744b765202b23b (diff)
downloadaur-1a1f65b32e7daa4580a3d67176410d6b75728ed4.tar.gz
moved the build script here
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD25
2 files changed, 24 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c35373973de3..428f1e12ac0a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = pacmanity-git
pkgdesc = Keeps a list of installed packages in a Gist at your GitHub account
- pkgver = r51.a2f674b
+ pkgver = r53.e181875
pkgrel = 1
epoch = 2
url = https://github.com/dszryan/pacmanity
diff --git a/PKGBUILD b/PKGBUILD
index 152632f44ea8..a001626db341 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: dszryan
pkgname=pacmanity-git
-pkgver=r51.a2f674b
+pkgver=r53.e181875
pkgrel=1
epoch=2
pkgdesc="Keeps a list of installed packages in a Gist at your GitHub account"
@@ -20,7 +20,28 @@ pkgver() {
}
build() {
- source "$srcdir/${pkgname/-git/}/pacmanity.sh" && pacmanity_build
+ echo "A list of installed packages will be automatically maintained"
+ echo "by Pacmanity in a private Gist at your GitHub account."
+
+ echo -e "\n- Step 1: Log in to Gist using your GitHub account:"
+ [[ -f ~/.gist ]] || gist --login # dont save login details in package, due to securiry concerns
+
+ # if file is present, assume it is maanged externally (via a build system)
+ [[ -r /etc/pacmanity ]] && source /etc/pacmanity
+ if [ -z "$GIST_ID" ]; then
+ echo -e "\n- Step 2: Save list of currently installed packages to Gist:"
+ GIST_URL=$(echo . | gist -p -f $HOSTNAME.pacmanity -d "$HOSTNAME: List of installed packages")
+ GIST_ID=$(echo "$GIST_URL" | sed "s|https://gist.github.com/||g")
+ echo "GIST_ID=$GIST_ID" > "$srcdir/gist_id"
+ else
+ "$srcdir/${pkgname/-git/}/pacmanity.sh"
+ GIST_URL=https://gist.github.com/$GIST_ID
+ fi
+
+ echo "An automatically mantained list of installed packages"
+ echo "has been successfully created in your GitHub Gist."
+ echo "Visit https://gist.github.com or the direct link below:"
+ echo "$GIST_URL"
}
package() {