Timo Aaltonen pushed to branch debian-unstable at X Strike Force / xorg
Commits:
3d6bd60c by Jochen Sprickerhof at 2021-08-18T10:17:28+02:00
Replace which by command -v
/usr/bin/which from debianutils is deprecated and POSIX defines command
-v.
- - - - -
3 changed files:
- debian/local/Xsession
- debian/local/Xsession.d/20x11-common_process-args
- debian/x11-common.init
Changes:
=====================================
debian/local/Xsession
=====================================
@@ -15,7 +15,7 @@ message () {
# is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
- if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
+ if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
@@ -25,7 +25,7 @@ message_nonl () {
# xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
- if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
+ if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
=====================================
debian/local/Xsession.d/20x11-common_process-args
=====================================
@@ -33,7 +33,7 @@ case $# in
;;
*)
# Specific program was requested.
- STARTUP_FULL_PATH=$(/usr/bin/which "${1%% *}" || true)
+ STARTUP_FULL_PATH=$(command -v "${1%% *}" || true)
if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then
if [ -x "$STARTUP_FULL_PATH" ]; then
STARTUP="$1"
=====================================
debian/x11-common.init
=====================================
@@ -22,7 +22,7 @@ fi
do_restorecon () {
# Restore file security context (SELinux).
- if which restorecon >/dev/null 2>&1; then
+ if command -v restorecon >/dev/null 2>&1; then
restorecon "$1"
fi
}
View it on GitLab:
https://salsa.debian.org/xorg-team/xorg/-/commit/3d6bd60c17ff052fc3f35eb0f17553fcf3d0b23f
--
View it on GitLab:
https://salsa.debian.org/xorg-team/xorg/-/commit/3d6bd60c17ff052fc3f35eb0f17553fcf3d0b23f
You're receiving this email because of your account on salsa.debian.org.