# HG changeset patch # User Nattee Niparnan # Date 2015-02-05 15:26:23 # Node ID 027e22738156f1e7f14846cedf3e1a063640da7b # Parent bb5ce2d65aeb6422d8a9626fbe97fe36e11fee0a update diff --git a/installer/install.sh b/installer/install.sh --- a/installer/install.sh +++ b/installer/install.sh @@ -156,6 +156,17 @@ echo "require File.join(File.dirname(__FILE__),'../lib/boot')" >> scripts/config/environment.rb echo "require File.dirname(__FILE__) + \"/env_#{GRADER_ENV}.rb\"" >> scripts/config/environment.rb +# compiling box +MACHINE_TYPE=`uname -m` +if [ ${MACHINE_TYPE} == 'x86_64' ]; then + gcc -std=c99 -o scripts/std-script/box scripts/std-script/box64-new.c + # 64-bit stuff here +else + g++ -o scripts/std-script/box scripts/std-script/box.cc + # 32-bit stuff here +fi + + cd .. echo "Now you are ready to run cafe grader...."