uci-docker-build/src/init.sh

26 lines
859 B
Bash

#!/bin/sh
echo "entry init.sh script in $SCRIPTS"
# remove other distro files
# find $PWD -maxdepth 1 -type d ! -path $PWD ! -name ${LINUX_DISTRO} ! -name common -exec rm -rf {} +
cd ${LINUX_DISTRO} || exit 1
echo " ----- Running ${LINUX_DISTRO} specific init script ----- ";
/bin/bash init.sh
cd ..
cd common || exit 1
echo " ***** Running common initialzation script *****"
ls -la;
/bin/bash init.sh;
cd ..
cd ${LINUX_DISTRO} || exit 1
echo " ----- Running ${LINUX_DISTRO} specific post commont script ----- ";
if [[ -f post_common.sh ]]; then
echo "running distro specific commands after common install in post_common.sh"
/bin/bash post_common.sh
echo returned from ${LINUX_DISTRO} post common script
fi
cd ..
if [ -z $KEEP ]; then
echo removing $SCRIPTS directory used for build
cd /opt && rm -rf $SCRIPTS
fi