2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2020 Samsung Electronics
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
15 # shellcheck disable=SC1091
16 source /etc/os-release || source /usr/lib/os-release
19 if ! command -v shellcheck; then
21 *suse*|rhel|centos|fedora)
30 if ! command -v pip; then
34 if [ -n "$pkgs" ]; then
37 sudo zypper install --gpg-auto-import-keys refresh
38 sudo -H -E zypper install -y --no-recommends "$pkgs"
42 sudo -H -E apt-get -y --no-install-recommends install "$pkgs"
45 PKG_MANAGER=$(command -v dnf || command -v yum)
46 if ! sudo "$PKG_MANAGER" repolist | grep "epel/"; then
47 sudo -H -E "$PKG_MANAGER" -q -y install epel-release
49 sudo "$PKG_MANAGER" updateinfo --assumeyes
50 sudo -H -E "${PKG_MANAGER}" -y install "$pkgs"
56 bash -c 'shopt -s globstar; shellcheck **/*.sh'