#!/bin/sh echo "entry init.sh script in $PWD" # 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 ----- "; ./init.sh cd .. cd common || exit 1 echo " ***** Running common initialzation script *****" ls -la; ./init.sh; 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" ./post_common.sh fi echo returned from ${LINUX_DISTRO} post common script if [ -z $KEEP ]; then echo removing $SCRIPTS directory used for build cd /opt && rm -rf $SCRIPTS fi