4 DISTRO
="https://ftp.cs.ru.nl/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz"
5 TAGS
="https://gitlab.science.ru.nl/cloogle/cloogle-tags/-/jobs/artifacts/master/raw/cloogletags?job=build"
6 CLM
="https://gitlab.science.ru.nl/mlubbers/clm/builds/artifacts/master/raw/clm?job=compile"
7 CLM1
="https://gitlab.science.ru.nl/mlubbers/clm/builds/artifacts/master/raw/clm.1?job=compile"
8 CLEAN_HOME
="${CLEAN_HOME:-/opt/clean}"
10 echo "Cleaning up the old distro"
11 rm -rf "$CLEAN_HOME"/*
12 echo "Downloading clean"
13 curl
-sSL "$DISTRO" |
tar -C "$CLEAN_HOME" --strip-components=1 -xz
15 curl
-sSLo "$CLEAN_HOME/bin/clm" "$CLM"
16 echo "Installing manpages"
17 mkdir
-p ~
/.local
/man
/man1
18 curl
-sSLo ~
/.local
/man
/man
1/clm
.1 "$CLM1"
19 echo "Downloading cloogletags"
20 curl
-sSLo "$CLEAN_HOME"/bin
/cloogletags
"$TAGS"
21 chmod +x
"$CLEAN_HOME"/bin
/cloogletags
22 echo "Generating tags"
23 cloogletags
-a -c -d "$CLEAN_HOME"/lib
-o "$CLEAN_HOME"/lib
/tags
2>/dev
/null
25 echo "Patching StdEnv for binumap"
26 patch /opt
/clean
/lib
/StdEnv
/StdGeneric.dcl
<<EOPATCH
27 --- StdGeneric.dcl 2018-12-17 02:43:55.000000000 +0100
28 +++ StdGeneric.dcl 2018-12-17 11:06:09.196234236 +0100
33 +generic binumap a b | binumap b a :: a -> b
36 +derive binumap EITHER
37 +derive binumap OBJECT
39 +derive binumap RECORD
43 // HACK: dictionaries for all generics.
44 // It works since all generic classes have only one method and do not inherit
48 patch /opt
/clean
/lib
/StdEnv
/StdGeneric.icl
<<EOPATCH
49 --- StdGeneric.icl 2018-12-17 02:43:55.000000000 +0100
50 +++ StdGeneric.icl 2018-12-17 11:06:09.196234236 +0100
53 bimap{|(->)|} _ ba fr _ f = comp3 fr f ba
57 +binumap{|PAIR|} fx _ fy _ (PAIR x y) = PAIR (fx x) (fy y)
59 +binumap{|EITHER|} fl _ fr _ (LEFT x) = LEFT (fl x)
60 +binumap{|EITHER|} fl _ fr _ (RIGHT x) = RIGHT (fr x)
62 +binumap{|CONS|} fx _ (CONS x) = CONS (fx x)
64 +binumap{|RECORD|} fx _ (RECORD x) = RECORD (fx x)
66 +binumap{|FIELD|} fx _ (FIELD x) = FIELD (fx x)
68 +binumap{|OBJECT|} fx _ (OBJECT x) = OBJECT (fx x)
70 +binumap{|(->)|} _ ba fr _ f = comp3 fr f ba
72 comp3 :: !(.a -> .b) u:(.c -> .a) !(.d -> .c) -> u:(.d -> .b)
77 echo "Adding the iTasks-git environment"
78 patch /opt
/clean
/etc
/IDEEnvs
<<EOPATCH
79 --- 2019-07-24 02:47:02.000000000 +0200
80 +++ IDEEnvs 2019-07-24 08:22:52.713808372 +0200
82 Path: {Application}/lib/Platform/Deprecated/StdLib
83 Path: {Application}/lib/ABCInterpreter
84 Path: {Application}/lib/GraphCopy
85 - Path: {Application}/lib/iTasks
86 + Path: {Application}/lib/iTasks
87 + Path: {Application}/lib/Gast
88 + EnvironmentCompiler: lib/exe/cocl::-dynamics
89 + EnvironmentCodeGen: lib/exe/cg
90 + EnvironmentLinker: lib/exe/linker|lib/exe/itasks-web-collector
91 + EnvironmentDynLink: lib/exe/linker
92 + EnvironmentABCOptimise: lib/exe/abcopt
93 + EnvironmentByteCodeGen: lib/exe/bcgen
94 + EnvironmentByteCodeLink: lib/exe/bclink
95 + EnvironmentByteCodeStrip: lib/exe/bcstrip
96 + EnvironmentByteCodePrelink: lib/exe/bcprelink
97 + EnvironmentVersion: 920
98 + EnvironmentRedirect: False
99 + EnvironmentCompileMethod: Pers
100 + EnvironmentProcessor: I386
101 + Environment64BitProcessor: True
103 + EnvironmentName: iTasks-git
105 + Path: {Application}/lib/StdEnv
106 + Path: {Application}/lib/Dynamics
107 + Path: {Application}/lib/TCPIP
108 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/Platform-x86
109 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Posix
110 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux
111 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux-64
112 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent
113 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/Generics
114 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
115 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/ArgEnv
116 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/MersenneTwister
117 + Path: {Application}/lib/ABCInterpreter
118 + Path: {Application}/lib/GraphCopy
119 + Path: /home/mrl/projects/clean/iTasks-SDK/Libraries
120 + Path: {Application}/lib/iTasks
121 + Path: {Application}/lib/Gast
122 EnvironmentCompiler: lib/exe/cocl::-dynamics
123 EnvironmentCodeGen: lib/exe/cg
124 EnvironmentLinker: lib/exe/linker|lib/exe/itasks-web-collector