ADDED bbgo Index: bbgo ================================================================== --- /dev/null +++ bbgo @@ -0,0 +1,41 @@ +#!/bin/bash -x + + + +prefix=/opt/chicken/4.11.0 +buildwd=/opt/mtbuild +mtsrcdir=$PWD + + +if [[ ! -e .aptdone ]]; then + echo updating apt and installing packages + sudo apt -y update + if [[ ! $? == 0 ]]; then + echo "Problem during apt update, aborting" + exit 1 + fi + + + #sudo apt -y upgrade + sudo apt -y install libreadline-dev libwebkitgtk-dev libpangox-1.0-0 zlib1g-dev libfreetype6-dev cmake libssl-dev uuid-dev cmake curl ruby wget + if [[ ! $? == 0 ]]; then + echo "Problem during apt install, aborting" + exit 1 + fi + + touch .aptdone +else + echo 'apt work already done [.aptdone file exists]' +fi + +if [[ ! -e $prefix ]]; then mkdir -p $prefix || exit 1; fi + + +cd $buildwd + +env \ + OPTION=std \ + PREFIX=$prefix \ + $mtsrcdir/utils/installall.sh +#2>&1 | $mtsrcdir/utils/timecat.rb | tee installall.log + ADDED bbreset Index: bbreset ================================================================== --- /dev/null +++ bbreset @@ -0,0 +1,3 @@ +rm -rf /opt/buildmt/* +rm -rf /opt/chicken/* + Index: utils/installall.sh ================================================================== --- utils/installall.sh +++ utils/installall.sh @@ -11,10 +11,23 @@ # greater. See the accompanying file COPYING for details. # # This program is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. + +mtsrcdir=$(dirname $(dirname $BASH_SOURCE)) + +function abort() { + echo "Error: previous command failed: ($1)" + echo "Aborting." + exit 1 +}; + +function do_wget() { + echo "Downloading $1" + wget "$@" || abort 'Could not download - [wget '"$@"' ]' +}; if [[ $OPTION=="" ]]; then export OPTION=std fi @@ -44,14 +57,24 @@ # Set up variables # case $SYSTEM_TYPE in Ubuntu-17.10-x86_64-std) - KTYPE=32 - CDVER=5.11.1 - IUPVER=3.22 - IMVER=3.12 + ## libpng workaround - https://github.com/tcoopman/image-webpack-loader/issues/95 + if [[ ! -e /usr/lib/x86_64-linux-gnu/libpng12.so.0 ]]; then + do_wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \ + && sudo dpkg -i /tmp/libpng12.deb \ + && rm /tmp/libpng12.deb + fi + + KTYPE=32 + CDVER=5.11.1 #BB not present?? + CDVER=5.10 + IUPVER=3.22 # BB: not present? + IUPVER=3.19.1 + IMVER=3.12 #BB not present?? + IMVER=3.11 # CHICKEN_VERSION=4.12.0 # CHICKEN_BASEVER=4.12.0 ;; Ubuntu-17.04-x86_64-std) KTYPE=32 @@ -118,11 +141,11 @@ # # script -c 'PREFIX=/tmp/delme ./installall.sh ' installall.log # logpro installall.logpro installall.html < installall.log # firefox installall.html -sleep 5 +#sleep 5 if [[ $proxy == "" ]]; then echo 'Please set the environment variable "proxy" to host.com:port (e.g. foo.com:1234) to use a proxy' echo PROX="" else @@ -142,11 +165,11 @@ mkdir -p tgz # http://code.call-cc.org/releases/4.8.0/chicken-4.8.0.5.tar.gz chicken_targz=chicken-${CHICKEN_VERSION}.tar.gz if ! [[ -e tgz/$chicken_targz ]]; then - wget http://code.call-cc.org/releases/${CHICKEN_BASEVER}/${chicken_targz} + do_wget http://code.call-cc.org/releases/${CHICKEN_BASEVER}/${chicken_targz} mv $chicken_targz tgz fi BUILDHOME=$PWD DEPLOYTARG=$BUILDHOME/deploy @@ -183,11 +206,11 @@ #if [[ ! -e 1.0.0.tar.gz ]];then # wget --no-check-certificate https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz # mv 1.0.0 1.0.0.tar.gz #fi if ! [[ -e $PREFIX/lib64/libnanomsg.so.1.0.0 ]]; then - wget --no-check-certificate https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz + do_wget --no-check-certificate https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz mv 1.0.0 1.0.0.tar.gz tar xf 1.0.0.tar.gz cd nanomsg-1.0.0 ./configure --prefix=$PREFIX make @@ -199,11 +222,11 @@ export SQLITE3_VERSION=3090200 if ! [[ -e $PREFIX/bin/sqlite3 ]]; then echo Install sqlite3 sqlite3_tgz=sqlite-autoconf-$SQLITE3_VERSION.tar.gz if ! [[ -e tgz/$sqlite3_tgz ]]; then - wget http://www.sqlite.org/2015/$sqlite3_tgz + do_wget http://www.sqlite.org/2015/$sqlite3_tgz mv $sqlite3_tgz tgz fi if ! [[ -e $PREFIX/bin/sqlite3 ]] ; then if [[ -e tgz/sqlite-autoconf-$SQLITE3_VERSION.tar.gz ]]; then @@ -214,11 +237,11 @@ fi if ! [[ -e $PREFIX/bin/pg_config ]]; then echo Install Postgresql pgsql_tgz=postgresql-9.6.4.tar.gz if ! [[ -e tgz/$pgsql_tgz ]]; then - wget -c https://ftp.postgresql.org/pub/source/v9.6.4/$pgsql_tgz + do_wget -c https://ftp.postgresql.org/pub/source/v9.6.4/$pgsql_tgz mv $pgsql_tgz tgz fi if ! [[ -e $PREFIX/bin/pg_config ]]; then if [[ -e tgz/$pgsql_tgz ]]; then tar xfz tgz/$pgsql_tgz @@ -297,12 +320,12 @@ mkdir -p $PREFIX/iuplib mkdir -p iup/ for a in `echo $files` ; do if ! [[ -e tgz/$a ]] ; then - echo wget -c -O tgz/$a http://www.kiatoa.com/matt/chicken-build/$a - wget -c http://www.kiatoa.com/matt/chicken-build/$a + echo wget -c -O tgz/$a http://www.kiatoa.com/matt/chicken-build/$a + do_wget -c http://www.kiatoa.com/matt/chicken-build/$a mv `echo $a | cut -d'/' -f2` tgz/ fi echo Untarring tgz/$a into $BUILDHOME/lib tar -xzf tgz/`echo $a | cut -d'/' -f2` -C iup/ #(cd $PREFIX/lib;tar xfvz $BUILDHOME/tgz/$a;mv include/* ../include) @@ -316,11 +339,11 @@ # ffcall obtained from: # cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/libffcall co ffcall #exit if ! [[ -e $PREFIX/include/callback.h ]] ; then #fossil clone http://www.kiatoa.com/fossils/ffcall ffcall.fossil - wget -c -O ffcall.tar.gz 'http://www.kiatoa.com/fossils/ffcall/tarball?name=ffcall&uuid=trunk' + do_wget -c -O ffcall.tar.gz 'http://www.kiatoa.com/fossils/ffcall/tarball?name=ffcall&uuid=trunk' tar -xzf ffcall.tar.gz #mkdir -p ffcall cd ffcall #fossil open ../ffcall.fossil ./configure --prefix=$PREFIX --enable-shared @@ -331,11 +354,11 @@ #wget -c -O opensrc.tar.gz 'http://www.kiatoa.com/fossils/opensrc/tarball?name=opensrc&uuid=trunk' # Not working due to login problems. if ! [[ -e $PREFIX/bin/hs ]] ; then #fossil clone http://www.kiatoa.com/fossils/opensrc opensrc.fossil #mkdir -p opensrc - wget -c -O opensrc.tar.gz 'http://www.kiatoa.com/fossils/opensrc/tarball?name=opensrc&uuid=trunk' + do_wget -c -O opensrc.tar.gz 'http://www.kiatoa.com/fossils/opensrc/tarball?name=opensrc&uuid=trunk' tar -xzf opensrc.tar.gz cd opensrc #fossil open ../opensrc.fossil cd histstore $PREFIX/bin/csc histstore.scm -o hs @@ -351,11 +374,11 @@ fi cd $BUILDHOME if [[ ! -e $PREFIX/bin/stmlrun ]] ; then #fossil clone http://www.kiatoa.com/fossils/stml stml.fossil - wget -c -O stml.tar.gz 'http://www.kiatoa.com/fossils/stml/tarball?name=stml&uuid=trunk' + do_wget -c -O stml.tar.gz 'http://www.kiatoa.com/fossils/stml/tarball?name=stml&uuid=trunk' tar -xzf stml.tar.gz cd stml #fossil open ../stml.fossil cp install.cfg.template install.cfg echo "TARGDIR=$PREFIX/bin" > install.cfg @@ -383,15 +406,16 @@ # CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" $CHICKEN_INSTALL $PROX -D no-library-checks -deploy -prefix $DEPLOYTARG canvas-draw cd $BUILDHOME # install ducttape -if [[ -e ../ducttape ]];then - cd ../ducttape +if [[ -e $mtsrcdir/ducttape ]];then + cd $mtsrcdir/ducttape $CHICKEN_INSTALL else - echo "ducttape egg not found at ../ducttape. You will need to cd into the ducttape directory in the megatest distribution and run \"chicken-install\"" + echo "Error: ducttape egg not found at $mtsrcdir/ducttape. You will need to cd into the ducttape directory in the megatest distribution and run \"chicken-install\"" + exit 1 fi cd $BUILDHOME echo You may need to add $LD_LIBRARY_PATH to your LD_LIBRARY_PATH variable, a setup-chicken4x.sh echo file can be found in the current directory which should work for setting up to run chicken4x ADDED utils/timecat.rb Index: utils/timecat.rb ================================================================== --- /dev/null +++ utils/timecat.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby + +# -*- Mode: Ruby; -*- + +# Author: brandon.j.barclay (bjbarcla) 13ww48.1 + +require 'pathname' +STDOUT.sync = true +STDERR.sync = true + +### main sequence + +prev = start = Time.now.to_f + +STDIN.each_line{|line| + now = Time.now.to_f + total_elapsed = now - start + delta = now - prev + prev = now + puts sprintf("[line_elapsed=%7.2f] [tot_elapsed=%7.2f] |> %s", delta, total_elapsed, line) +} +exit 0