diff options
author | David Parrish | 2015-06-24 04:28:58 -0400 |
---|---|---|
committer | David Parrish | 2015-06-24 04:28:58 -0400 |
commit | ac9bc93819081135677fa1be282c4f87860ee73b (patch) | |
tree | df265183ea3b3a3001d0af4812307414a4c8f9fc | |
parent | 0a7f0bf97dbec068cb14a8ef7cc87ed63bb8bdb8 (diff) | |
download | aur-ac9bc93819081135677fa1be282c4f87860ee73b.tar.gz |
Add NRS shortcut
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | nrs.desktop | 9 | ||||
-rwxr-xr-x | nrs.sh | 20 |
4 files changed, 42 insertions, 2 deletions
@@ -16,9 +16,11 @@ pkgbase = nxt-git source = nxt-git::git+https://bitbucket.org/JeanLucPicard/nxt.git source = nxt.service source = nxt.install + source = nrs.sh sha256sums = SKIP sha256sums = 293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7 sha256sums = b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca + sha256sums = fc58e5aac478f3459686f0a9ab5e059776c1a34392391fed257e5130bfd29bc2 pkgname = nxt-git @@ -12,10 +12,14 @@ makedepends=('java-environment-openjdk=8') optdepends=('flashplugin: for add to clipboard support') source=("${pkgname}::git+https://bitbucket.org/JeanLucPicard/nxt.git" "nxt.service" - "nxt.install") + "nxt.install" + "nrs.sh" + "nrs.desktop") sha256sums=('SKIP' '293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7' - 'b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca') + 'b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca' + 'fc58e5aac478f3459686f0a9ab5e059776c1a34392391fed257e5130bfd29bc2' + '8381f120b645cca9079b5e958a8917326f71b55f031f15df3324703377638eee') install='nxt.install' pkgver() { @@ -40,4 +44,9 @@ package() { install -Dm644 "${pkgname}/COPYING.txt" "$pkgdir/usr/share/licenses/nxt/COPYING.txt" install -Dm644 "${pkgname}/3RD-PARTY-LICENSES.txt" "$pkgdir/usr/share/licenses/nxt/3RD-PARTY-LICENSES.txt" install -Dm644 "${pkgname}/LICENSE.txt" "$pkgdir/usr/share/licenses/nxt/LICENSES.txt" + + # NRS shortcut + install -Dm644 "${pkgname}/html/nrs/icon.png" "${pkgdir}/usr/share/pixmaps/nrs.png" + install -Dm644 nrs.desktop "${pkgdir}/usr/share/applications/nrs.desktop" + install -Dm755 nrs.sh "$pkgdir/usr/bin/nrs" } diff --git a/nrs.desktop b/nrs.desktop new file mode 100644 index 000000000000..2dd9e5cc70b4 --- /dev/null +++ b/nrs.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=NRS +GenericName=Nxt Reference Software +Comment=Nxt Reference Software +Exec=/usr/bin/nrs +Icon=/usr/share/pixmaps/nrs.png +Terminal=false +Type=Application +Categories=Utility;Finance; diff --git a/nrs.sh b/nrs.sh new file mode 100755 index 000000000000..d5f81ff43cd5 --- /dev/null +++ b/nrs.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +nxt_status=$(systemctl is-active nxt) + +which notify-send > /dev/null +is_libnotify_installed=$? + +if [ $libnotify_installed ]; then + echo "libnotify_installed" +fi + +if [ $nxt_status != "active" ]; then + start_nxt_message="NXT service isn't active. Try starting NXT with 'systemctl start nxt' if NRS doesn't load." + if [ $is_libnotify_installed ]; then + notify-send "NRS" "$start_nxt_message" + fi + echo "$start_nxt_message" +fi + +xdg-open http://localhost:7876/ |