[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/xorg][debian-unstable] Replace which by command -v



Title: GitLab

Timo Aaltonen pushed to branch debian-unstable at X Strike Force / xorg

Commits:

3 changed files:

Changes:

  • debian/local/Xsession
    ... ... @@ -15,7 +15,7 @@ message () {
    15 15
       # is available and $DISPLAY is set
    
    16 16
       MESSAGE="$PROGNAME: $*"
    
    17 17
       echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
    
    18
    -  if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
    
    18
    +  if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
    
    19 19
         echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
    
    20 20
       fi
    
    21 21
     }
    
    ... ... @@ -25,7 +25,7 @@ message_nonl () {
    25 25
       # xmessage if it is available and $DISPLAY is set
    
    26 26
       MESSAGE="$PROGNAME: $*"
    
    27 27
       echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
    
    28
    -  if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
    
    28
    +  if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
    
    29 29
         echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
    
    30 30
       fi
    
    31 31
     }
    

  • debian/local/Xsession.d/20x11-common_process-args
    ... ... @@ -33,7 +33,7 @@ case $# in
    33 33
             ;;
    
    34 34
           *)
    
    35 35
             # Specific program was requested.
    
    36
    -        STARTUP_FULL_PATH=$(/usr/bin/which "${1%% *}" || true)
    
    36
    +        STARTUP_FULL_PATH=$(command -v "${1%% *}" || true)
    
    37 37
             if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then
    
    38 38
               if [ -x "$STARTUP_FULL_PATH" ]; then
    
    39 39
                 STARTUP="$1"
    

  • debian/x11-common.init
    ... ... @@ -22,7 +22,7 @@ fi
    22 22
     
    
    23 23
     do_restorecon () {
    
    24 24
       # Restore file security context (SELinux).
    
    25
    -  if which restorecon >/dev/null 2>&1; then
    
    25
    +  if command -v restorecon >/dev/null 2>&1; then
    
    26 26
         restorecon "$1"
    
    27 27
       fi
    
    28 28
     }
    


  • Reply to: