92b32228b2c8a6c317da233b9078d29ed85f109d

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Add PKGBUILD and version bump script

Diff

 1diff --git a/PKGBUILD b/PKGBUILD
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..533e3689344635b1c475508439828a7d3ef297bb
 4--- /dev/null
 5+++ b/PKGBUILD
 6@@ -0,0 +1,25 @@
 7+# Maintainer: Yaron de Leeuw < me@jarondl.net >
 8+
 9+# Maintained at : https://github.com/jarondl/aur-pkgbuilds-jarondl
10+
11+pkgname=duplicity-backup
12+pkgver=1.7.0
13+pkgrel=1
14+pkgdesc="Bash wrapper script for automated backups with duplicity"
15+arch=('any')
16+url="https://github.com/TheEdgeOfRage/duplicity-backup"
17+license=('GPL3')
18+makedepends=('git')
19+depends=('duplicity')
20+optdepends=(
21+    'gnupg: encryption support'
22+    's3cmd: for storing on Amazon S3'
23+    'mailx: for mail notifications'
24+)
25+source=("https://github.com/TheEdgeOfRage/duplicity-backup.sh/archive/refs/tags/v${pkgver}.tar.gz")
26+md5sums=('SKIP')
27+
28+package() {
29+    install -D -m644 "$pkgname.sh-${pkgver}/duplicity-backup.conf.example" "$pkgdir/usr/share/duplicity-backup.conf"
30+    install -D -m755 "$pkgname.sh-${pkgver}/duplicity-backup.sh" "$pkgdir/usr/bin/duplicity-backup"
31+}
32diff --git a/bump_version.sh b/bump_version.sh
33new file mode 100755
34index 0000000000000000000000000000000000000000..cbb91179634e0cf4d2c6c9bc4bd8d52f52dc68ad
35--- /dev/null
36+++ b/bump_version.sh
37@@ -0,0 +1,21 @@
38+new_version=$1
39+if [ -z "$new_version" ]; then
40+    echo "Missing version parameter. Usage:" >&2
41+    echo "./bump_version x.x.x" >&2
42+    exit 1
43+fi
44+
45+if [ -n "$(git status --porcelain)" ]; then
46+    echo "Working tree is dirty. Please commit or stash changes first." >&2
47+    exit 1
48+fi
49+
50+echo Bumping to "$new_version"
51+sed -i -E "s/pkgver=[0-9]+\.[0-9]+\.[0-9]+/pkgver=${new_version}/" PKGBUILD
52+sed -i -E "s/DBSH_VERSION=\"v[0-9]+\.[0-9]+\.[0-9]+\"/DBSH_VERSION=\"v${new_version}\"/" duplicity-backup.sh
53+
54+git add PKGBUILD duplicity-backup.sh
55+git commit -m "Bump to ${new_version}"
56+git push origin main
57+git tag "v${new_version}"
58+git push "v${new_version}"