[Xfce4-commits] [xfce/xfce4-session] 01/05: scripts/xinitrc.in.in: use "command" shell builtin instead of which(1)

noreply at xfce.org noreply at xfce.org
Wed May 8 19:06:31 CEST 2019


This is an automated email from the git hooks/post-receive script.

s   k   u   n   n   y   k       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-session.

commit 4c9e19dbb8e0de98d664cd74657e912df8e125c7
Author: ISAEV Leonid <leis8574 at vika.t-lan>
Date:   Tue May 15 03:44:52 2018 -0600

    scripts/xinitrc.in.in: use "command" shell builtin instead of which(1)
    
    - Fix bug #14399
---
 scripts/xinitrc.in.in | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index 8aea66c..366924b 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -46,7 +46,7 @@ fi
 
 # set up XDG user directores.  see
 # http://freedesktop.org/wiki/Software/xdg-user-dirs
-if which xdg-user-dirs-update >/dev/null 2>&1; then
+if command -v xdg-user-dirs-update >/dev/null 2>&1; then
     xdg-user-dirs-update
 fi
 
@@ -79,12 +79,12 @@ cat /dev/null $XRESOURCES | xrdb -merge -
 test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
 
 # run xfce4-session if installed
-if which xfce4-session >/dev/null 2>&1; then
+if command -v xfce4-session >/dev/null 2>&1; then
 
   # check if we start xfce4-session with ck-launch-session. this is only
   # required for starting from a console, not a login manager
   if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
-    if which ck-launch-session >/dev/null 2>&1; then
+    if command -v ck-launch-session >/dev/null 2>&1; then
       ck-launch-session xfce4-session
     else
       echo
@@ -117,7 +117,7 @@ fi
 
 # Use dbus-launch if installed.
 if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
-  if which dbus-launch >/dev/null 2>&1; then
+  if command -v dbus-launch >/dev/null 2>&1; then
     eval `dbus-launch --sh-syntax --exit-with-session`
     # some older versions of dbus don't export the var properly
     export DBUS_SESSION_BUS_ADDRESS
@@ -147,11 +147,11 @@ if test -d "$XDG_CONFIG_HOME/autostart"; then
     # check for TryExec
     trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
     if test "$trycmd"; then
-      which "$trycmd" >/dev/null 2>&1 || continue
+      command -v "$trycmd" >/dev/null 2>&1 || continue
     fi
 
     cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
-    if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
+    if test "$cmd" && command -v "$cmd" >/dev/null 2>&1; then
       $cmd &
     fi
   done
@@ -160,7 +160,7 @@ fi
 xfdesktop&
 orage &
 
-panel=`which xfce4-panel`
+panel=`command -v xfce4-panel`
 case "x$panel" in
 	x|xno*)
 		;;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list