File: install-ada.sh

package info (click to toggle)
ghdl 2.0.0%2Bdfsg-6.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 72,852 kB
  • sloc: ada: 238,924; vhdl: 196,551; ansic: 24,457; python: 17,483; sh: 11,399; cpp: 2,283; makefile: 1,440; pascal: 516; exp: 40; asm: 25
file content (27 lines) | stat: -rwxr-xr-x 781 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

set -e

if [ -e gnat/etc/install_ok ] && [ "x$(cat gnat/etc/install_ok)" = "x2019" ]; then
    echo "gnatgpl already installed"
    exit 0
fi

set -x

# Remove old gnat directory
if [ -d gnat ]; then
    rm -rf gnat
fi

# Download from community.adacore.com and extract
wget -q --show-progress --progress=bar:force:noscroll -O dmgfile https://community.download.adacore.com/v1/5a7801fc686e86de838cfaf7071170152d81254d?filename=gnat-community-2019-20190517-x86_64-darwin-bin.dmg
7z x dmgfile
installer="gnat-community-2019-20190517-x86_64-darwin-bin/gnat-community-2019-20190517-x86_64-darwin-bin.app/Contents/MacOS/gnat-community-2019-20190517-x86_64-darwin-bin"

# Install
mkdir -p gnat
chmod +x $installer
./$installer PREFIX=gnat

echo "2019" > gnat/etc/install_ok