Rebuild autotool system
[construo.git] / xml2sexpr.sh
blob2af9249e23097169b28d35bef70863a5e00b9570
1 #!/bin/sh
3 # Little script to convert Construo 0.0.x XML files to Construo
4 # 0.1.0's sexpr format
6 sed "s/<?xml version=\"1.0\"?>//" | \
7 sed "s/<spring>/(spring /" | \
8 sed "s/<\/spring>/)/" | \
9 sed "s/<first>/(first /" | \
10 sed "s/<\/first>/)/" | \
11 sed "s/<second>/(second /" | \
12 sed "s/<\/second>/)/" | \
13 sed "s/<construo-scene>/(construo-scene/" | \
14 sed "s/<\/construo-scene>/)/" | \
15 sed "s/<cl-vector>//g" | \
16 sed "s/<\/cl-vector>//g" | \
17 sed "s/<spring-list>/(springs /" | \
18 sed "s/<\/spring-list>/)/" | \
19 sed "s/<[xyz]>/ /g" | \
20 sed "s/<\/[xyz]>/ /g" | \
21 sed "s/<position>/(pos /g" | \
22 sed "s/<\/position>/) /g" | \
23 sed "s/<velocity>/(velocity /g" | \
24 sed "s/<\/velocity>/) /g" | \
25 sed "s/<particle-list>/(particles /" | \
26 sed "s/<\/particle-list>/)/" | \
27 sed "s/<\/particle>/)/" | \
28 sed "s/<particle id=\"\([0-9]*\)\">/(particle (id \1) /"
30 # EOF #