summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Monfils2019-07-09 11:11:46 +0200
committerNathan Monfils2019-07-09 11:11:46 +0200
commit8d97b4a2e844ad70fcbc761124dfe7d6d5db6e4f (patch)
treed48e4c1785a36f28ced87339a2681d1eaa51c856
parent5b8f79bc58cb5a012914bcc74d15b7ff6b9aff01 (diff)
downloadaur-8d97b4a2e844ad70fcbc761124dfe7d6d5db6e4f.tar.gz
Added postinst script to create access tokens
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD4
-rw-r--r--spotify-backup-git.install9
3 files changed, 13 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cf576996a12a..d56ca1c4bd10 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = spotify-backup-git
- pkgver = r5.8747342
+ pkgver = r6.5a96c02
pkgrel = 1
url = https://gitlab.com/azertyfun/spotify-backup
+ install = spotify-backup-git.install
arch = any
license = MIT
makedepends = git
diff --git a/PKGBUILD b/PKGBUILD
index 08dcd011043d..7038a4e594e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Nathan Monfils <nathan.monfils@hotmail.fr>
pkgname=spotify-backup-git
-pkgver=r5.8747342
+pkgver=r6.5a96c02
pkgrel=1
pkgdesc=""
arch=(any)
@@ -14,7 +14,7 @@ conflicts=("${pkgname%-VCS}")
replaces=()
backup=()
options=()
-install=
+install="${pkgname}.install"
source=("spotify-backup.service"
"spotify-backup.timer"
"${pkgname}::git+https://gitlab.com/azertyfun/spotify-backup.git")
diff --git a/spotify-backup-git.install b/spotify-backup-git.install
new file mode 100644
index 000000000000..a2e646df842b
--- /dev/null
+++ b/spotify-backup-git.install
@@ -0,0 +1,9 @@
+post_install() {
+ # Create the spotify-backup.conf file if it doesn't exist
+ sudo spotify-backup -c /var/lib/spotify-backup/spotify-backup.conf /dev/null &> /dev/null
+
+ echo "You will probably need to create a spotify application and add its client_id and client_secret to /var/lib/spotify-backup/spotify-backup.conf"
+ echo "You will then need to run spotify-backup once manually to set the access and refresh tokens:"
+ echo "# spotify-backup -c /var/lib/spotify-backup/spotify-backup.conf /dev/null"
+}
+