uci-docker-build/Dockerfile.d/packages.tpl

32 lines
1.1 KiB
Smarty
Raw Normal View History

#!/bin/bash
%
if [[ $REBUILD == "packages" ]]; then
echo "## Busting Cache, Forcing Rebuild $(date)"
fi
%
echo "************* PACKAGE INSTALLATION ***********************"
if ! { [ "$VERBOSE" = "packages" ] || [ "$VERBOSE" = "all" ]; }; then unset VERBOSE; fi
source /opt/lib/verbose.lib
source /opt/core_run.env
echo Distro is $LINUX_DISTRO
echo package installer command for this build: "$INSTALL_PKGS"
echo package update command for this build: "$UPDATE_PKGS"
if [[ -f ./packages.lst || -f ./packages.sh ]]; then
if [[ -f ./packages.lst ]]; then
echo "----- Installing Packages ---------------"
_pkgs=$(< ./packages.lst)
echo $_pkgs
echo ....
silence ${INSTALL_PKGS} ${_pkgs}
echo "done ----- Installing Packages ---------------"
fi
if [[ -f ./packages.sh ]]; then
echo "---- Running package installation script packages.sh -----"
/bin/bash -l ./packages.sh
echo "done ---- Running package installation script packages.sh -----"
fi
else
echo neither packages.lst, nor packages.sh in source
echo nothing to install!
fi
echo "********************************"