15_asn1scc.sh 698 Bytes
Newer Older
1
#!/bin/bash
2
3
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
4
5

# Fetch and install latest ASN1SCC release
6
7
mkdir -p "${PREFIX}/share/asn1scc/" || exit 1
cd "${PREFIX}/share/" || exit 1
Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
8
VER=$(mono ~/tool-inst/share/asn1scc/asn1.exe -v |  head -1 | awk '{print $NF}')
Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
9
10
if [ "${VER}" != "4.2.4.4f" ] ; then
    wget -q -O - https://github.com/ttsiodras/asn1scc/releases/download/4.2.4.4f/asn1scc-bin-4.2.4.4f.tar.bz2 \
11
        | tar jxvf -
12
fi
13
14
# Delete the AST cache folder in case the new version of the compiler generates different XML/Python output
find $HOME/.taste_AST_cache/ -type f -delete
15

16
17
18
# Add to PATH
PATH_CMD='export PATH=$PATH:'"${PREFIX}/share/asn1scc/"
UpdatePATH