Skip to content

Commit cca313f

Browse files
committed
add tests/update.sh
1 parent c8dd61e commit cca313f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

scripts/tests/update.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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

Comments
 (0)