2023-04-22 08:19:45 -07:00
|
|
|
#!/bin/bash
|
2023-04-14 21:27:40 -07:00
|
|
|
%
|
|
|
|
if [[ $REBUILD == "packages" ]]; then
|
|
|
|
echo "## Busting Cache, Forcing Rebuild $(date)"
|
|
|
|
fi
|
|
|
|
%
|
2023-04-22 08:19:45 -07:00
|
|
|
echo "************* PACKAGE INSTALLATION ***********************"
|
|
|
|
if ! { [ "$VERBOSE" = "packages" ] || [ "$VERBOSE" = "all" ]; }; then unset VERBOSE; fi
|
|
|
|
source /opt/lib/verbose.lib
|
2024-01-14 14:57:09 -08:00
|
|
|
export BUILDING=true
|
|
|
|
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
|
|
|
echo sourcing core_run.env
|
|
|
|
quiet cat /opt/core_run.env
|
2023-04-22 08:19:45 -07:00
|
|
|
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"
|
2024-01-14 14:57:09 -08:00
|
|
|
list=$(ls *system.pkgs 2> /dev/null)
|
|
|
|
list+=" $(ls ./system/*.pkgs 2> /dev/null)"
|
|
|
|
quiet echo list of system package files to install: $list
|
|
|
|
for file in $list; do
|
|
|
|
[ -f "$file" ] || break
|
|
|
|
echo "----- Installing System Packages from $file ---------------"
|
|
|
|
while IFS= read -r pkg || [ -n "$pkg" ]; do
|
|
|
|
echo installing: $pkg
|
|
|
|
silence $INSTALL_PKGS $pkg
|
|
|
|
done < ./$file
|
|
|
|
echo "done ----- Installing System Packages from $file ---------------"
|
|
|
|
done
|
|
|
|
|
|
|
|
[[ -f $ENV_DIR/run.env ]] && echo "sourcing $ENV_DIR/run.env" && source $ENV_DIR/run.env
|
|
|
|
|
|
|
|
if [[ -f ./repositories.sh ]]; then
|
|
|
|
echo "---- Running custom repository install script repositories.sh -----"
|
|
|
|
source ./repositories.sh
|
|
|
|
echo "done ---- Running repository installation script repositories.sh -----"
|
2023-04-22 08:19:45 -07:00
|
|
|
fi
|
2024-01-14 14:57:09 -08:00
|
|
|
if [[ -f ./packages.sh ]]; then
|
|
|
|
echo "---- Running custom package installation script packages.sh -----"
|
|
|
|
source ./packages.sh
|
2023-04-22 08:19:45 -07:00
|
|
|
echo "done ---- Running package installation script packages.sh -----"
|
2024-01-14 14:57:09 -08:00
|
|
|
fi
|
|
|
|
# TODO run a package cache removal based on distro
|
2023-04-22 08:19:45 -07:00
|
|
|
echo "********************************"
|