summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin2019-05-18 20:17:33 -0500
committerKevin2019-05-18 20:17:33 -0500
commiteed4c0bbf4ad370bc7bb082772465da7a0cde47a (patch)
tree1e340ccfe27832548de5fee700c69d7faacb024f
parentba7deedb8ef0fc11b0febeea8e4ac24daf3ec7bc (diff)
downloadaur-eed4c0bbf4ad370bc7bb082772465da7a0cde47a.tar.gz
better nvman.install
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--nvman.install21
3 files changed, 17 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3dea8b2f98ec..b5c9541e2a4c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nvman
pkgdesc = NVIDIA Manager for Optimus/Bumblebee
pkgver = 1.2.3
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/quebin31/nvman
install = nvman.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 1b55df29a4d5..11ee88b4cc75 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=nvman
pkgver=1.2.3
-pkgrel=4
+pkgrel=5
pkgdesc="NVIDIA Manager for Optimus/Bumblebee"
arch=('any')
url=https://github.com/quebin31/nvman
diff --git a/nvman.install b/nvman.install
index 15414e188175..a0d2022ec693 100644
--- a/nvman.install
+++ b/nvman.install
@@ -1,10 +1,19 @@
post_install() {
- echo -n "IMPORTANT! Run 'nvman default bumblebee' or 'nvman default optimus' to set "
- echo "one default service! (extremely needed)"
-
- echo "Enabling nvman.service (if possible)"
+ echo "$(tput bold)$(tput setaf 6)::$(tput sgr0) Enabling nvman.service"
systemctl enable nvman.service
- echo -n "IMPORTANT! Enable 'nvman.service' with 'systemctl enable nvman.service' "
- echo "(if it wasn't enabled yet)"
+ if [[ $? -ne 0 ]]; then
+ echo "$(tput bold)$(tput setaf 1)::$(tput sgr0) Failed to enable nvman.service"
+ echo "$(tput bold)$(tput setaf 3)IMPORTANT!$(tput sgr0) Please enable nvman.service manually"
+ else
+ echo "$(tput bold)$(tput setaf 6)::$(tput sgr0) Succesfully enabled nvman.service"
+ fi
+
+ # Reminders
+ echo "$(tput bold)$(tput setaf 3)IMPORTANT!$(tput sgr0) Don't disable nvman.service"
+ echo "$(tput bold)$(tput setaf 3)IMPORTANT!$(tput sgr0) Remember that optimus-manager only works with Xorg!"
+
+ # Suggestions
+ echo -n "$(tput bold)$(tput setaf 3)IMPORTANT!$(tput sgr0) If you want to change your default"
+ echo " service use 'nvman default <service>' (default: optimus)"
}