summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Ruhier2018-03-22 01:21:15 +0100
committerAnthony Ruhier2018-03-22 01:22:33 +0100
commitee40b8660b2379d75845306a90e15d1f4c661bde (patch)
tree02143feee44ad93fa3e1e3e40cbaa5c4e6940b49
parenta9d339879c8877ddf4a9a08bfda7ce36f28d7770 (diff)
downloadaur-ee40b8660b2379d75845306a90e15d1f4c661bde.tar.gz
Ensure everything exist before post_upgrade
Hooks are started after post_upgrade, so target dir doesn't exist
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--headphones.install12
3 files changed, 10 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b4d82fff6a7..db2e445bb69b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = headphones-git
pkgdesc = Music downloader for usenet and torrents.
pkgver = 0.5.18.r159.gda9287d7
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/rembo10/headphones
install = headphones.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 2d73ba32548b..d2bb0b91ac02 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=headphones-git
pkgver=0.5.18.r159.gda9287d7
-pkgrel=3
+pkgrel=4
pkgdesc="Music downloader for usenet and torrents."
arch=('any')
url="https://github.com/rembo10/headphones"
diff --git a/headphones.install b/headphones.install
index 2dfb8347452d..07c854508797 100644
--- a/headphones.install
+++ b/headphones.install
@@ -1,22 +1,26 @@
post_upgrade() {
+ # needed because started before hooks
+ sysemd-sysusers
+ systemd-tmpfiles --create
+
if (( $(vercmp "0.5.18.r159.gda9287d7-2" "$2") > 0 )); then
if [[ -f /opt/headphones/config.ini && ! -f /var/lib/headphones/config.ini ]]; then
- cp -a /opt/headphones/config.ini /var/lib/headphones/
+ cp -a /opt/headphones/config.ini /var/lib/headphones/config.ini
echo "Copied config.ini from /opt/headphones/ -> /var/lib/headphones/"
fi
if [[ -f /opt/headphones/headphones.db && ! -f /var/lib/headphones/headphones.db ]]; then
- cp -a /opt/headphones/headphones.db /var/lib/headphones/
+ cp -a /opt/headphones/headphones.db /var/lib/headphones/headphones.db
echo "Copied headphones.db from /opt/headphones/ -> /var/lib/headphones/"
fi
if [[ -d /opt/headphones/logs && ! -d /var/lib/headphones/logs ]]; then
- cp -a /opt/headphones/logs /var/lib/headphones/
+ cp -a /opt/headphones/logs /var/lib/headphones/logs
echo "Copied logs from /opt/headphones/ -> /var/lib/headphones/"
fi
if [[ -d /opt/headphones/cache && ! -d /var/lib/headphones/cache ]]; then
- cp -a /opt/headphones/cache /var/lib/headphones/
+ cp -a /opt/headphones/cache /var/lib/headphones/cache
echo "Copied cache from /opt/headphones/ -> /var/lib/headphones/"
fi
fi