diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-22 16:50:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-22 16:50:33 +0300 |
commit | 3cb212602cacc186800c82febc86f5c68c1f92fb (patch) | |
tree | 4b809c3c799df69f1bf02c60eaa334fb42163037 /build_files/build_environment | |
parent | e790f4a49fa779fc9063c60326b23f7bffa39c0e (diff) |
install_deps.sh: fix ffmpeg package installation on Arch
A blank space at the start of the string caused the list to be quoted
as a single argument.
Diffstat (limited to 'build_files/build_environment')
-rwxr-xr-x | build_files/build_environment/install_deps.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 64cff825b10..8bb011f1d20 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -993,6 +993,13 @@ download() { fi } +string_trim() { + local var="$*" + var="${var#"${var%%[![:space:]]*}"}" # Leading. + var="${var%"${var##*[![:space:]]}"}" # Trailing. + echo -n "$var" +} + # Return 0 if $1 = $2 (i.e. 1.01.0 = 1.1, but 1.1.1 != 1.1), else 1. # $1 and $2 should be version numbers made of numbers only. version_eq() { @@ -4753,6 +4760,8 @@ print_info_ffmpeglink() { _packages="$_packages $OPENJPEG_DEV" fi + _packages="$(string_trim $_packages)" + if [ "$DISTRO" = "DEB" ]; then print_info_ffmpeglink_DEB elif [ "$DISTRO" = "RPM" ]; then |