Browse Source

Fix script for seds that dont know + and ?

Herbert Vojčík 11 years ago
parent
commit
33fef79136
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bin/setversion.sh

+ 2 - 2
bin/setversion.sh

@@ -3,7 +3,7 @@ cd `dirname "$0"`
 cd ../st
 rm -f *.js
 cp Kernel-Infrastructure.st Kernel-Infrastructure.st.bak
-sed -e "/^version\$/,/^\! \!\$/ s/\^ '[0-9]\+\.[0-9]\+\.[0-9]\+\(-pre\)\?'\$/^ '$1'/" Kernel-Infrastructure.st.bak >Kernel-Infrastructure.st
+sed -e "/^version\$/,/^\! \!\$/ s/\^ '[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-pre\)\{0,1\}'\$/^ '$1'/" Kernel-Infrastructure.st.bak >Kernel-Infrastructure.st
 rm Kernel-Infrastructure.st.bak
 cd ..
 bin/amberc -d -l Kernel-Objects,Kernel-Collections Kernel-Infrastructure.st
@@ -12,6 +12,6 @@ mv *.js ../js
 cd ..
 for F in *.json; do
   cp $F $F.bak
-  sed -e "s/\"version\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\(-pre\)\?\"/\"version\": \"$1\"/" $F.bak >$F
+  sed -e 's/"version": "[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-pre\)\{0,1\}"/"version": "'"$1"'"/' $F.bak >$F
   rm $F.bak
 done