|
| 1 | +# ----------------------------------------------------------------------------- |
| 2 | +# This file is part of the xPack distribution. |
| 3 | +# (https://xpack.github.io) |
| 4 | +# Copyright (c) 2020 Liviu Ionescu. |
| 5 | +# |
| 6 | +# Permission to use, copy, modify, and/or distribute this software |
| 7 | +# for any purpose is hereby granted, under the terms of the MIT license. |
| 8 | +# ----------------------------------------------------------------------------- |
| 9 | + |
| 10 | +# ----------------------------------------------------------------------------- |
| 11 | + |
| 12 | +function tests_update_system() |
| 13 | +{ |
| 14 | + local image_name="$1" |
| 15 | + |
| 16 | + # Make sure that the minimum prerequisites are met. |
| 17 | + if [[ ${image_name} == github-actions-ubuntu* ]] |
| 18 | + then |
| 19 | + : # sudo apt-get -qq install -y XXX |
| 20 | + elif [[ ${image_name} == *ubuntu* ]] || [[ ${image_name} == *debian* ]] || [[ ${image_name} == *raspbian* ]] |
| 21 | + then |
| 22 | + : # run_verbose apt-get -qq install --yes ... |
| 23 | + elif [[ ${image_name} == *centos* ]] || [[ ${image_name} == *redhat* ]] || [[ ${image_name} == *fedora* ]] |
| 24 | + then |
| 25 | + run_verbose yum install --assumeyes --quiet libX11 |
| 26 | + elif [[ ${image_name} == *suse* ]] |
| 27 | + then |
| 28 | + run_verbose zypper --no-gpg-checks --quiet install --no-confirm libX11-6 |
| 29 | + elif [[ ${image_name} == *manjaro* ]] |
| 30 | + then |
| 31 | + run_verbose pacman -S --noconfirm --noprogressbar --quiet libx11 |
| 32 | + elif [[ ${image_name} == *archlinux* ]] |
| 33 | + then |
| 34 | + run_verbose pacman -S --noconfirm --noprogressbar --quiet libx11 |
| 35 | + fi |
| 36 | + |
| 37 | + echo |
| 38 | + echo "The system C/C++ libraries..." |
| 39 | + find /usr/lib* /lib -name 'libc.*' -o -name 'libstdc++.*' -o -name 'libgcc_s.*' |
| 40 | +} |
| 41 | + |
| 42 | +# ----------------------------------------------------------------------------- |
0 commit comments