* GCC_VERSION=10.2.0 * BINUTILS_VERSION=2.35.1 * GDB_VERSION=10.1 (except centos-7 8.3) * CMAKE_VERSION=3.18.4 * CPPCHECK_VERSION=2.2 * LLVM_VERSION=11.0.0 * SWIG_VERSION=4.0.2
46 lines
995 B
Bash
46 lines
995 B
Bash
#!/bin/bash
|
|
|
|
operating_system() {
|
|
grep -E '^(VERSION_)?ID=' /etc/os-release | \
|
|
sort | cut -d '=' -f 2- | sed 's/"//g' | paste -s -d '-'
|
|
}
|
|
|
|
check_all_yum() {
|
|
local missing=""
|
|
for pkg in $1; do
|
|
if ! yum list installed "$pkg" >/dev/null 2>/dev/null; then
|
|
missing="$pkg $missing"
|
|
fi
|
|
done
|
|
if [ "$missing" != "" ]; then
|
|
echo "MISSING PACKAGES: $missing"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
check_all_dpkg() {
|
|
local missing=""
|
|
for pkg in $1; do
|
|
if ! dpkg -s "$pkg" >/dev/null 2>/dev/null; then
|
|
missing="$pkg $missing"
|
|
fi
|
|
done
|
|
if [ "$missing" != "" ]; then
|
|
echo "MISSING PACKAGES: $missing"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
check_all_dnf() {
|
|
local missing=""
|
|
for pkg in $1; do
|
|
if ! dnf list installed "$pkg" >/dev/null 2>/dev/null; then
|
|
missing="$pkg $missing"
|
|
fi
|
|
done
|
|
if [ "$missing" != "" ]; then
|
|
echo "MISSING PACKAGES: $missing"
|
|
exit 1
|
|
fi
|
|
}
|