blob: c315eee7c7ffd0d3a679088cc7808c87eda74557 (
plain) (
blame)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#!/bin/bash
if [ -d /opt/clean ]; then
rm -rf /opt/clean.bak
mv /opt/clean /opt/clean.bak
else
rm -rf /opt/clean
fi
mkdir /opt/clean
for pkg in base lib-directory lib-dynamics lib-gast lib-graphcopy lib-itasks lib-platform lib-sapl lib-tcpip test
do
curl ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-$pkg-linux-x64-latest.tgz\
| tar xz --strip-components=1 -C /opt/clean
done
grep -h '^[[:space:]]' /opt/clean/etc/*.env >> /opt/clean/etc/IDEEnvs
cat ~/.clean/iTasksDev.env >> /opt/clean/etc/IDEEnvs
sed -i 's=lib/exe/linker=lib/exe/linker:-no-pie=' /opt/clean/etc/IDEEnvs
ln -s lib/exe /opt/clean/exe
# cloogletags
cloogletags -a -c -d /opt/clean/lib -o /opt/clean/lib/tags
link_local_file(){
echo "$1 -> $2"
mkdir -p "$(dirname "$CLEAN_HOME/$1")"
if [ -f "$CLEAN_HOME/$1" ]; then
mv "$CLEAN_HOME/$1" "$CLEAN_HOME/$1.org"
ln -s "$(realpath --no-symlinks "$2")" "$CLEAN_HOME/$1.new"
ln -s "$(basename "$1").new" "$CLEAN_HOME/$1"
else
ln -s "$(realpath --no-symlinks "$2")" "$CLEAN_HOME/$1"
fi
}
# Local versions of binaries
link_local_file bin/clm ~/VersionControl/clean-tools-git/clm/clm
link_local_file bin/cpm ~/VersionControl/clean-ide/cpm/cpm
link_local_file lib/exe/cocl /home/camil/VersionControl/clean-compiler/cocl
link_local_file bin/cleantest ~/VersionControl/clean-test/cleantest
link_local_file bin/testproperties ~/VersionControl/clean-test-properties/src/testproperties
link_local_file data/cleandoc-default ~/VersionControl/clean-doc/data/cleandoc-default
link_local_file bin/cleandoc ~/VersionControl/clean-doc/src/cleandoc
link_local_file bin/cleanprof2callgrind ~/VersionControl/cleanprof2callgrind/cleanprof2callgrind
# ABC interpreter binaries
link_local_file lib/exe/optimise ~/VersionControl/abc-interpreter/src/optimise
link_local_file lib/exe/bcgen ~/VersionControl/abc-interpreter/src/bcgen
link_local_file lib/exe/bclink ~/VersionControl/abc-interpreter/src/link
# completion
for f in ~/VersionControl/clean-completion/*; do
[ -f "$f" ] || continue
base="$(basename "$f")"
if [[ "$base" == "Makefile" ]] || [[ "$base" == "README.md" ]] || [[ "$base" =~ .tar.gz$ ]]; then
continue
fi
link_local_file "etc/completion/$base" "$f"
done
|