taste-asn1-iterators 881 Bytes
Newer Older
1 2
#!/bin/bash -e

Maxime Perrotin's avatar
Maxime Perrotin committed
3
echo 'taste-asn1-iterators (c) 2018 European Space Agency (maxime.perrotin@esa.int)'
4

Maxime Perrotin's avatar
Maxime Perrotin committed
5
STG_PREFIX=$PREFIX/share/asn1_iterators/stg
6 7 8 9 10 11 12 13 14 15
OUT=iterators

if [ ! -f "$1" ]
then
    echo '[ERROR] You must specify ASN.1 files'
    exit 1
fi

mkdir -p $OUT

Maxime Perrotin's avatar
Maxime Perrotin committed
16 17 18 19 20 21 22
mono $(which asn1.exe) -o iterators \
                       -typePrefix asn1Scc \
                       -Ada \
                       -customStg "$STG_PREFIX"/ada_iterators-iterators-ads.stg:"$OUT"/asn1_ada_iterators-iterators.ads \
                       -customStg "$STG_PREFIX"/ada_iterators-iterators-adb.stg:"$OUT"/asn1_ada_iterators-iterators.adb \
                       -customStg "$STG_PREFIX"/ada_iterators.stg:"$OUT"/asn1_ada_iterators.ads \
                       $1
23 24 25 26
for f in "*.o" "*.ali" "b~*" "bin" "GPS_project.gpr" "examiner" "*.wrn" "gnat.cfg" "runSpark.sh" "spark.idx" 
do
    rm -rf "$OUT"/$f
done