#!/bin/bash # # Take the output from RackBuilder, and jam # into appropriate parts of a project # GENERATED=$1 RENDERED=$1/Output XCODEP=$2 DESTINATION=$XCODEP/.. if [ ! -d "$GENERATED" ] then echo usage: $0 '' '' exit -1 fi if [ ! -d "$XCODEP" ] then echo usage: $0 '' '' exit -1 fi function deleteAndCopy { FILE=$1 SOURCE_DIR=$2 DEST_DIR=$3 mkdir -p $DEST_DIR echo copying $SOURCE_DIR/$FILE to $DEST_DIR rm -rf $DEST_DIR/$FILE cp -rf $SOURCE_DIR/$FILE $DEST_DIR } deleteAndCopy resources $GENERATED $DESTINATION/GUI deleteAndCopy Output $GENERATED $DESTINATION/GUI deleteAndCopy omrack.device $GENERATED $DESTINATION/GUI deleteAndCopy motherboard_def.lua $GENERATED $DESTINATION deleteAndCopy info.lua $GENERATED $DESTINATION deleteAndCopy texts.lua $GENERATED $DESTINATION/Resources/English deleteAndCopy OmRack.h $GENERATED $DESTINATION