Files
loci/scripts/install_packages.sh
portdirect 17d1079547 Args: Add distrobution packages to args
This PS adds the ability to install arbitary distrobution
packages via args, allowing development and deployment helper
utilities to be simply included in an image.

Change-Id: Id3ce8bceda185978e1d1843072aac44f49b3d95a
2018-02-16 12:23:47 -05:00

25 lines
597 B
Bash
Executable File

#!/bin/bash
set -ex
if [[ "${PYTHON3}" != "no" ]]; then
python3=python3
fi
PACKAGES=($(bindep -f /opt/loci/bindep.txt -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
if [[ ! -z ${PACKAGES} ]]; then
case ${distro} in
debian|ubuntu)
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
;;
centos)
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]} ${DIST_PACKAGES}
;;
*)
echo "Unknown distro: ${distro}"
exit 1
;;
esac
fi