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