Changeset 357
- Timestamp:
- Jun 8, 2018, 1:11:16 PM (5 years ago)
- Location:
- rubycfg_ssp/trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rubycfg_ssp/trunk/build_ssp_ruby.sh
r292 r357 2 2 set -eu 3 3 4 SCRIPT_DIR=$(cd $(dirname $0);pwd) 5 6 if [ ! -e asp3 ]; then 7 if [ ! -e asp3-3.1.0.tar.gz ]; then 8 curl https://www.toppers.jp/download.cgi/asp3-3.1.0.tar.gz -o asp3-3.1.0.tar.gz 9 fi 10 tar xvf asp3-3.1.0.tar.gz 4 if [ ! -v SCRIPTS_DIR ]; then 5 SCRIPTS_DIR=$(cd $(dirname $0);pwd) 11 6 fi 12 7 13 if [ ! -e ssp_ruby ]; then 14 if [ ! -e ssp-1.3.0.tar.gz ]; then 15 curl http://www.toppers.jp/download.cgi/ssp-1.3.0.tar.gz -o ssp-1.3.0.tar.gz 16 fi 17 mkdir ssp_ruby 18 tar xvf ssp-1.3.0.tar.gz -C ssp_ruby --strip-components 2 8 if [ ! -v WORK_DIR ]; then 9 WORK_DIR=$HOME/workdir 19 10 fi 20 11 21 for i in `find ssp_ruby -type f` ; do nkf --overwrite --oc=UTF-8 $i; done 22 cp -a asp3/sample/Makefile ssp_ruby/sample 12 SSP_DIR=$WORK_DIR/ssp 13 SSP_PACKAGE=ssp-1.3.0.tar.gz 14 SSP_DOWNLOAD_URL=http://www.toppers.jp/download.cgi/$SSP_PACKAGE 15 SSP_TARGET_NAME=cq_frk_fm3_gcc 23 16 24 ${SCRIPT_DIR}/install.sh ssp_ruby 17 ASP3_DIR=$WORK_DIR/asp3 18 ASP3_PACKAGE=asp3-3.1.0.tar.gz 19 ASP3_DOWNLOAD_URL=https://www.toppers.jp/download.cgi/$ASP3_PACKAGE 25 20 26 cd ssp_ruby27 ln -s ../asp3/configure.rb configure.rb28 ln -s ../asp3/cfg cfg29 21 30 # build a kernel with the ruby configurator 31 mkdir build 32 cd build 33 ../configure.rb -T cq_frk_fm3_gcc -w 34 make 22 : "setup tools (compiler, emulator, etc.)" && { 23 $SCRIPTS_DIR/setup_tools.sh 24 . $HOME/.profile 25 } 26 27 : "Download TOPPERS/ASP3 package to get a configurator files" && { 28 cd $WORK_DIR 29 if [ ! -e $ASP3_DIR ]; then 30 if [ ! -e $ASP3_PACKAGE ]; then 31 curl $ASP3_DOWNLOAD_URL -o $ASP3_PACKAGE 32 fi 33 tar xvf $ASP3_PACKAGE 34 fi 35 } 36 37 : "if ssp directory already exists, rename it and create new directory" && { 38 cd $WORK_DIR 39 if [ -e $SSP_DIR ]; then 40 mv $SSP_DIR $SSP_DIR.$(date +%Y%m%d_%H%M%S) 41 fi 42 43 if [ ! -e $SSP_PACKAGE ]; then 44 curl $SSP_DOWNLOAD_URL -o $SSP_PACKAGE 45 fi 46 47 mkdir $SSP_DIR 48 tar xvf $SSP_PACKAGE -C $SSP_DIR --strip-components 2 49 } 50 51 : "setup source code(convert to UTF8, patch, etc.)" && { 52 for i in `find $SSP_DIR -type f` ; do nkf --overwrite --oc=UTF-8 $i; done 53 cp -a $ASP3_DIR/sample/Makefile $SSP_DIR/sample 54 55 $SCRIPTS_DIR/install.sh $SSP_DIR 56 57 cd $SSP_DIR 58 ln -s $ASP3_DIR/configure.rb configure.rb 59 ln -s $ASP3_DIR/cfg cfg 60 } 61 62 : "build a kernel" && { 63 cd $SSP_DIR 64 if [ -e build ]; then 65 mv build build.$(date +%Y%m%d_%H%M%S) 66 fi 67 mkdir build 68 cd build 69 ../configure.rb -T $SSP_TARGET_NAME -w 70 make 71 } 35 72 36 73 exit 0 37
Note:
See TracChangeset
for help on using the changeset viewer.