[debian-edu-commits] [Git][debian-edu/debian-edu-artwork][master] Use 'command -v' instead of deprecated 'which'

Wolfgang Schweer (@schweer-guest) gitlab at salsa.debian.org
Mon Oct 25 09:36:26 BST 2021



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-artwork


Commits:
8cd372a5 by Wolfgang Schweer at 2021-10-25T10:32:48+02:00
 Use 'command -v' instead of deprecated 'which'

Adjust debian/debian-edu-artwork-{buster,homeworld,softwaves}.postinst.
debian/update-debian-edu-artwork-{buster,homeworld,softwaves} and
debian/debian-edu-artwork.postrm

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


8 changed files:

- debian/changelog
- debian/debian-edu-artwork-buster.postinst
- debian/debian-edu-artwork-homeworld.postinst
- debian/debian-edu-artwork-softwaves.postinst
- debian/debian-edu-artwork.postrm
- debian/update-debian-edu-artwork-buster
- debian/update-debian-edu-artwork-homeworld
- debian/update-debian-edu-artwork-softwaves


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+debian-edu-artwork (2.12.0.2-2) UNRELEASED; urgency=medium
+
+  * Use 'command -v' instead of deprecated 'which', adjust:
+    - debian/debian-edu-artwork-{buster,homeworld,softwaves}.postinst
+    - debian/update-debian-edu-artwork-{buster,homeworld,softwaves}
+    - debian/debian-edu-artwork.postrm
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Fri, 22 Oct 2021 18:14:08 +0200
+
 debian-edu-artwork (2.12.0.2-1) unstable; urgency=medium
 
   [ Wolfgang Schweer ]


=====================================
debian/debian-edu-artwork-buster.postinst
=====================================
@@ -16,7 +16,7 @@ case "$1" in
 	;;
 	triggered)
 		update-debian-edu-artwork-$EDUTHEME configure
-		if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && which plymouth-set-default-theme > /dev/null ; then
+		if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && command -v plymouth-set-default-theme > /dev/null ; then
 			plymouth-set-default-theme -R debian-edu-${EDUTHEME}
 		fi
 	;;


=====================================
debian/debian-edu-artwork-homeworld.postinst
=====================================
@@ -16,7 +16,7 @@ case "$1" in
 	;;
 	triggered)
 		update-debian-edu-artwork-$EDUTHEME configure
-		if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && which plymouth-set-default-theme > /dev/null ; then
+		if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && command -v plymouth-set-default-theme > /dev/null ; then
 			plymouth-set-default-theme -R debian-edu-${EDUTHEME}
 		fi
 	;;


=====================================
debian/debian-edu-artwork-softwaves.postinst
=====================================
@@ -16,7 +16,7 @@ case "$1" in
 	;;
 	triggered)
 		update-debian-edu-artwork-$EDUTHEME configure
-		if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && which plymouth-set-default-theme > /dev/null ; then
+		if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && command -v plymouth-set-default-theme > /dev/null ; then
 			plymouth-set-default-theme -R debian-edu-${EDUTHEME}
 		fi
 	;;


=====================================
debian/debian-edu-artwork.postrm
=====================================
@@ -3,7 +3,7 @@
 set -e
 
 restore_plymouth_theme() {
-	if which plymouth-set-default-theme > /dev/null ; then
+	if command -v plymouth-set-default-theme > /dev/null ; then
 	    plymouth-set-default-theme -r || true
 	    update-initramfs -u -k all
 	fi


=====================================
debian/update-debian-edu-artwork-buster
=====================================
@@ -30,7 +30,7 @@ change_grub_background() {
         --slave /usr/share/desktop-base/grub_background.sh \
         desktop-grub.sh \
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub_background.sh
-    if which update-grub > /dev/null ; then
+    if commans -v update-grub > /dev/null ; then
         sync
         update-grub || true
     fi
@@ -41,7 +41,7 @@ restore_grub_background() {
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub-4x3.png
     update-alternatives --remove desktop-grub \
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub-16x9.png
-    if which update-grub > /dev/null ; then
+    if command -v update-grub > /dev/null ; then
         update-grub || true
     fi
 }
@@ -102,13 +102,13 @@ restore_desktop_background() {
 
 ## Plymouth
 set_plymouth_theme() {
-    if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && which plymouth-set-default-theme > /dev/null ; then
+    if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && command -v plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme -R debian-edu-${EDUTHEME} || true
     fi
 }
 
 restore_plymouth_theme() {
-    if [ -f /etc/plymouth/plymouthd.conf ] && which plymouth-set-default-theme > /dev/null ; then
+    if [ -f /etc/plymouth/plymouthd.conf ] && command -v plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme -R -r || true
     fi
 }


=====================================
debian/update-debian-edu-artwork-homeworld
=====================================
@@ -30,7 +30,7 @@ change_grub_background() {
         --slave /usr/share/desktop-base/grub_background.sh \
         desktop-grub.sh \
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub_background.sh
-    if which update-grub > /dev/null ; then
+    if command -v update-grub > /dev/null ; then
         sync
         update-grub || true
     fi
@@ -41,7 +41,7 @@ restore_grub_background() {
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub-4x3.png
     update-alternatives --remove desktop-grub \
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub-16x9.png
-    if which update-grub > /dev/null ; then
+    if command -v update-grub > /dev/null ; then
         update-grub || true
     fi
 }
@@ -108,13 +108,13 @@ restore_desktop_background() {
 
 ## Plymouth
 set_plymouth_theme() {
-    if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && which plymouth-set-default-theme > /dev/null ; then
+    if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && command -v plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme -R debian-edu-${EDUTHEME} || true
     fi
 }
 
 restore_plymouth_theme() {
-    if [ -f /etc/plymouth/plymouthd.conf ] && which plymouth-set-default-theme > /dev/null ; then
+    if [ -f /etc/plymouth/plymouthd.conf ] && command -v plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme -R -r || true
     fi
 }


=====================================
debian/update-debian-edu-artwork-softwaves
=====================================
@@ -30,7 +30,7 @@ change_grub_background() {
         --slave /usr/share/desktop-base/grub_background.sh \
         desktop-grub.sh \
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub_background.sh
-    if which update-grub > /dev/null ; then
+    if command -v update-grub > /dev/null ; then
         sync
         update-grub || true
     fi
@@ -41,7 +41,7 @@ restore_grub_background() {
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub-4x3.png
     update-alternatives --remove desktop-grub \
         /usr/share/desktop-base/debian-edu-${EDUTHEME}-theme/grub/grub-16x9.png
-    if which update-grub > /dev/null ; then
+    if command -v update-grub > /dev/null ; then
         update-grub || true
     fi
 }
@@ -104,13 +104,13 @@ restore_desktop_background() {
 
 ## Plymouth
 set_plymouth_theme() {
-    if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && which plymouth-set-default-theme > /dev/null ; then
+    if [ -f /etc/plymouth/plymouthd.conf ] && [ -f /etc/debian-edu/config ] && command -v plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme -R debian-edu-${EDUTHEME} || true
     fi
 }
 
 restore_plymouth_theme() {
-    if [ -f /etc/plymouth/plymouthd.conf ] && which plymouth-set-default-theme > /dev/null ; then
+    if [ -f /etc/plymouth/plymouthd.conf ] && command -v plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme -R -r || true
     fi
 }



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-artwork/-/commit/8cd372a5e596cddc7ff0a47f9e921b78e98ec29b

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-artwork/-/commit/8cd372a5e596cddc7ff0a47f9e921b78e98ec29b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20211025/89cd43fe/attachment-0001.htm>


More information about the debian-edu-commits mailing list