[vlc-commits] [Git][videolan/vlc][master] 2 commits: tools: bootstrap: use shell || instead of test -o
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Fri Apr 22 07:19:00 UTC 2022
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
bb132914 by Alexandre Janniaux at 2022-04-22T06:29:27+00:00
tools: bootstrap: use shell || instead of test -o
shell || nicely handles the commands on the other lines without escaping
the end of line, which provides better error message in case of error.
In addition, priority of operators is much more obvious since the []
test syntax provides a visible scope-like feeling.
- - - - -
1e7d9e4e by Alexandre Janniaux at 2022-04-22T06:29:27+00:00
tools: bootstrap: remove non-digits from minor version
libtool is notoriously known to have been patched over the time and was
provided as 2.4.7-dirty on archlinux, which makes the integer comparison
test fail since 7-dirty is not an integer.
- - - - -
1 changed file:
- extras/tools/bootstrap
Changes:
=====================================
extras/tools/bootstrap
=====================================
@@ -22,15 +22,15 @@ check_version() {
gotver=$2
gotmajor=`echo $gotver|cut -d. -f1`
gotminor=`echo $gotver|cut -d. -f2`
- gotmicro=`echo $gotver|cut -d. -f3`
+ gotmicro=`echo $gotver|cut -d. -f3|tr -c -d '[:digit:]'`
[ -z "$gotmicro" ] && gotmicro=0
needmajor=`echo $3|cut -d. -f1`
needminor=`echo $3|cut -d. -f2`
needmicro=`echo $3|cut -d. -f3`
[ -z "$needmicro" ] && needmicro=0
- if [ "$needmajor" -ne "$gotmajor" \
- -o "$needmajor" -eq "$gotmajor" -a "$needminor" -gt "$gotminor" \
- -o "$needmajor" -eq "$gotmajor" -a "$needminor" -eq "$gotminor" -a "$needmicro" -gt "$gotmicro" ]
+ if [ "$needmajor" -ne "$gotmajor" ] ||
+ [ "$needmajor" -eq "$gotmajor" -a "$needminor" -gt "$gotminor" ] ||
+ [ "$needmajor" -eq "$gotmajor" -a "$needminor" -eq "$gotminor" -a "$needmicro" -gt "$gotmicro" ];
then
echo "$1 too old"
NEEDED="$NEEDED $1"
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/205963ad09401ab3cbe5bf92c7f9b109092f87f4...1e7d9e4e1a7b17ab459d2737da07e3b9568a957f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/205963ad09401ab3cbe5bf92c7f9b109092f87f4...1e7d9e4e1a7b17ab459d2737da07e3b9568a957f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list