| 123456789101112131415161718192021 | #!/bin/shVERSION=$1cd `dirname "$0"`/../..AMBER_BASE=`pwd`cd $AMBER_BASE/st# replace version numbercp Kernel-Infrastructure.st Kernel-Infrastructure.st.baksed -e "/^version\$/,/^\! \!\$/ s/\^ '[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-pre\)\{0,1\}'\$/^ '$VERSION'/" Kernel-Infrastructure.st.bak >Kernel-Infrastructure.strm Kernel-Infrastructure.st.bak# compile Kernel-Infrastructurecd $AMBER_BASEbin/amberc -D js -l Kernel-Objects,Kernel-Collections st/Kernel-Infrastructure.st# set version in all json files (bower, npm)for F in *.json; do  cp $F $F.bak  sed -e 's/"version": "[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-pre\)\{0,1\}"/"version": "'"$VERSION"'"/' $F.bak >$F  rm $F.bakdone
 |