diff options
author | SimPilotAdamT | 2022-04-14 11:35:11 +0100 |
---|---|---|
committer | SimPilotAdamT | 2022-04-14 11:35:11 +0100 |
commit | 49233feb44b3b70bc395a61ca5797fc7d0375a72 (patch) | |
tree | f0f703366d85dc15f97696ce9a8ea1e7e6bf5df2 | |
parent | 4a34857c40d9f08a5e25d9d3f683eafe894d8991 (diff) | |
download | aur-49233feb44b3b70bc395a61ca5797fc7d0375a72.tar.gz |
Allowing for people who are not using SystemD to ensure that the SystemD service does not get installed on their system.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rwxr-xr-x | .gitignore | 2 | ||||
-rwxr-xr-x | PKGBUILD | 20 |
3 files changed, 11 insertions, 13 deletions
@@ -1,7 +1,7 @@ pkgbase = fetchcord-testing pkgdesc = FetchCord grabs your OS info and displays it as Discord Rich Presence pkgver = 2.7.8 - pkgrel = 3 + pkgrel = 10 url = https://github.com/MrPotatoBobx/fetchcord install = fetchcord.install arch = any diff --git a/.gitignore b/.gitignore index 3ed2bbbe9561..72fbc7bc3c65 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.git +*.tar.gz *.pkg.tar.zst fetchcord/ pkg/ @@ -3,7 +3,7 @@ pkgname=fetchcord-testing pkgver=2.7.8 -pkgrel=3 +pkgrel=10 pkgdesc="FetchCord grabs your OS info and displays it as Discord Rich Presence" arch=('any') url="https://github.com/MrPotatoBobx/fetchcord" @@ -15,11 +15,6 @@ source=("fetchcord::git+$url#branch=testing") sha256sums=('SKIP') install=fetchcord.install -#pkgver() { -# cd "$srcdir/fetchcord" -# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -#} - build() { cd "$srcdir/fetchcord" python setup.py build @@ -30,14 +25,15 @@ package() { python setup.py install --root="$pkgdir" --optimize=1 - systemddir="/usr/lib/systemd/user" - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE - if [ -e "$systemddir/fetchcord.service" ]; then - echo "Not overwriting existing fetchcord.service" && install -Dm644 "$systemddir/fetchcord.service" "$pkgdir$systemddir/fetchcord.service"; - else - install -Dm644 systemd/fetchcord.service "$pkgdir$systemddir/fetchcord.service"; + if [[ `systemctl` =~ -\.mount ]]; then + systemddir="/usr/lib/systemd/user" + if [ -e "$systemddir/fetchcord.service" ]; then + echo "Not overwriting existing fetchcord.service" && install -Dm644 "$systemddir/fetchcord.service" "$pkgdir$systemddir/fetchcord.service"; + else + install -Dm644 systemd/fetchcord.service "$pkgdir$systemddir/fetchcord.service"; + fi fi } |