summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSimPilotAdamT2022-04-14 11:35:11 +0100
committerSimPilotAdamT2022-04-14 11:35:11 +0100
commit49233feb44b3b70bc395a61ca5797fc7d0375a72 (patch)
treef0f703366d85dc15f97696ce9a8ea1e7e6bf5df2 /PKGBUILD
parent4a34857c40d9f08a5e25d9d3f683eafe894d8991 (diff)
downloadaur-49233feb44b3b70bc395a61ca5797fc7d0375a72.tar.gz
Allowing for people who are not using SystemD to ensure that the SystemD service does not get installed on their system.
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-xPKGBUILD20
1 files changed, 8 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b9b288b1f868..650eb6570fe0 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}