#!/bin/bash echo " Creating ODE sandbox..." # Ensure backing build is accessible. if [ ! -d "$BACKING_BUILD" ]; then echo " Cannot access the backing build: $BACKING_BUILD" exit -1 fi SANDBOXRC=${SANDBOXROOT}/sbesandboxrc; # Delete existing sandbox if it exists. if [ -d "$SANDBOXBASE" ]; then # prompt the user to delete the sanbox or not if exist echo -ne " Remove existing sandbox? {y/n}:" read input if [ "$input" == "y" ];then echo " Executing : mksb -undo -auto -rc $SANDBOXRC -dir $SANDBOXROOT -sb $SANDBOXNAME" mksb -undo -auto -rc $SANDBOXRC -dir $SANDBOXROOT -sb $SANDBOXNAME else exit 0 fi fi if [ -d "$SANDBOXBASE" ]; then rm -rf $SANDBOXBASE rm -f $SANDBOXRC fi # Create sandbox. echo " Sandbox backing build = $BACKING_BUILD" echo " mksb -rc $SANDBOXRC -dir $SANDBOXROOT -back $BACKING_BUILD -sb $SANDBOXNAME -m ppc -auto" mksb -rc $SANDBOXRC -dir $SANDBOXROOT -back $BACKING_BUILD -sb $SANDBOXNAME -m ppc -auto || exit -1