From 1cd1cd022879745fe85cef4501400c9be6a5c2a3 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Wed, 26 Sep 2018 00:27:17 +0100 Subject: [PATCH] Fix: don't use sudo --- contrib/myMPD.spec | 2 +- debian/postinst | 2 +- mkrelease.sh | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/myMPD.spec b/contrib/myMPD.spec index 4ed56a1..6261760 100644 --- a/contrib/myMPD.spec +++ b/contrib/myMPD.spec @@ -49,7 +49,7 @@ chown -R mympd.mympd /var/lib/mympd if [ -d /etc/systemd ] then - [ -d /usr/lib/systemd/system ] || sudo mkdir -p /usr/lib/systemd/system + [ -d /usr/lib/systemd/system ] || mkdir -p /usr/lib/systemd/system cp /usr/share/mympd/mympd.service /usr/lib/systemd/system/ systemctl daemon-reload systemctl enable mympd diff --git a/debian/postinst b/debian/postinst index c033eb3..063dc61 100755 --- a/debian/postinst +++ b/debian/postinst @@ -46,7 +46,7 @@ then echo "Certificates already created" else echo "Creating certificates" - sudo /usr/share/mympd/crcert.sh + /usr/share/mympd/crcert.sh fi echo "myMPD installed" diff --git a/mkrelease.sh b/mkrelease.sh index 89f8fb8..a7c6ff2 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -48,5 +48,8 @@ cd .. debian/postinst -echo "Running cppcheck" -[ -x /usr/bin/cppcheck ] && cppcheck --enable=warning --inconclusive --force --inline-suppr src/*.c src/*.h +if [ -x /usr/bin/cppcheck ] +then + echo "Running cppcheck" + cppcheck --enable=warning --inconclusive --force --inline-suppr src/*.c src/*.h +fi