summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhanghua0002021-09-24 21:04:22 +0800
committerzhanghua0002021-09-24 21:04:22 +0800
commit53c372c87c7854f60ffed139aa3d3cd6af604fd6 (patch)
treef7f1af9a021bcddcece9e3b9c107c977dbef587d
parenta5eca45aeaa1546d259cd874991550ece2a5a45d (diff)
downloadaur-53c372c87c7854f60ffed139aa3d3cd6af604fd6.tar.gz
use script to notify user
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD7
-rw-r--r--aria2cd.hook2
-rwxr-xr-xnotify-user4
4 files changed, 14 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7f6c40e6f55f..aad54196bb4c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,19 @@
pkgbase = aria2cd
pkgdesc = A systemd Service to start aria2 automatically.
pkgver = 1.0
- pkgrel = 5
+ pkgrel = 6
url = https://aur.archlinux.org/aria2cd.git
arch = any
license = custom:WTFPL
depends = aria2
depends = systemd
+ source = notify-user
source = aria2cd.hook
source = aria2.conf
source = aria2@.service
source = LICENSE::http://www.wtfpl.net/txt/copying
- sha256sums = 01801b2e66b6ff139f0dc44cca7f8657f80796ad602adbe6ed3365fccf07e773
+ sha256sums = edc44eecc36d388b4f0d1b8efc3c6229342023fc68a03be85e64c4377688dc3c
+ sha256sums = 182b39e8f4f9cc979aa9cbaebbbb88298f009bfdb1c0bcb2d44fa538ff9fe73c
sha256sums = a075c9b90a4732ea7fb332e81ad50244e778977ec028a56ae0b29f895fd7db87
sha256sums = c863595990e32eb41aa76fd55d151acb04cee401fcf219d4e418b96fdc1468b2
sha256sums = 0356258391e190dc1d44ea01565cfe627fe44e27dad693a0a54c2483a7b223e5
diff --git a/PKGBUILD b/PKGBUILD
index 0aed838e5c8f..2b9538a3d6c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,19 +2,21 @@
pkgname=aria2cd
pkgver=1.0
-pkgrel=5
+pkgrel=6
pkgdesc="A systemd Service to start aria2 automatically."
arch=(any)
url="https://aur.archlinux.org/aria2cd.git"
license=(custom:WTFPL)
depends=(aria2 systemd)
source=(
+ notify-user
${pkgname}.hook
aria2.conf
aria2@.service
LICENSE::http://www.wtfpl.net/txt/copying
)
-sha256sums=('01801b2e66b6ff139f0dc44cca7f8657f80796ad602adbe6ed3365fccf07e773'
+sha256sums=('edc44eecc36d388b4f0d1b8efc3c6229342023fc68a03be85e64c4377688dc3c'
+ '182b39e8f4f9cc979aa9cbaebbbb88298f009bfdb1c0bcb2d44fa538ff9fe73c'
'a075c9b90a4732ea7fb332e81ad50244e778977ec028a56ae0b29f895fd7db87'
'c863595990e32eb41aa76fd55d151acb04cee401fcf219d4e418b96fdc1468b2'
'0356258391e190dc1d44ea01565cfe627fe44e27dad693a0a54c2483a7b223e5')
@@ -26,4 +28,5 @@ package(){
install -Dm644 ${srcdir}/aria2@.service ${pkgdir}/usr/lib/systemd/system/aria2@.service
install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licences/${pkgname}/LICENSE
install -Dm644 ${srcdir}/${pkgname}.hook ${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook
+ install -Dm644 ${srcdir}/notify-user ${pkgdir}/usr/share/libalpm/scripts/notify-user
}
diff --git a/aria2cd.hook b/aria2cd.hook
index 6c2f54785c5c..1b7429b42ee3 100644
--- a/aria2cd.hook
+++ b/aria2cd.hook
@@ -7,4 +7,4 @@ Target = aria2cd
[Action]
Description = Warning user about manyally operations...
When = PostTransaction
-Exec = /usr/bin/sh -c 'echo "You need to copy /usr/share/aria2/ to \${HOME}/.aria2/ or aria2c will not work correctly.";echo "\${HOME} is the home directory of the user who runs aria2c";echo "You can also use \${XDG_CONFIG_HOME}/aria2/ instead of \${HOME}/.aria2/ for config and \${XDG_CACHE_HOME}/aria2/ for cache files such as DHT file and session file.";echo "The latter(\${XDG_CACHE_HOME}/aria2/ and \${XDG_CONFIG_HOME}/aria2/) is preferered to use because it follows freedesktop's specification."'
+Exec = /usr/share/libalpm/scripts/notify-user
diff --git a/notify-user b/notify-user
new file mode 100755
index 000000000000..0c6a70bb96c1
--- /dev/null
+++ b/notify-user
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+echo "You need to copy /usr/share/aria2/ to \${HOME}/.aria2/ or aria2c will not work correctly.";echo "\${HOME} is the home directory of the user who runs aria2c"
+echo "You can also use \${XDG_CONFIG_HOME}/aria2/ instead of \${HOME}/.aria2/ for config and \${XDG_CACHE_HOME}/aria2/ for cache files such as DHT file and session file."
+echo "The latter(\${XDG_CACHE_HOME}/aria2/ and \${XDG_CONFIG_HOME}/aria2/) is preferered to use because it follows freedesktop's specification."