forked from herd/herdtools7
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathocb-install.sh
More file actions
executable file
·46 lines (36 loc) · 869 Bytes
/
ocb-install.sh
File metadata and controls
executable file
·46 lines (36 loc) · 869 Bytes
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
#!/bin/bash
set -eu
if [ "$#" -ne 1 ]
then
readonly this="${0}"
echo "Usage: ${this} prefix"
echo
echo "For example '${this} /home/john/.local' will copy:"
echo " * executables into /home/john/.local/bin"
echo " * library files into /home/john/.local/share/herdtools7"
exit 1
fi
readonly prefix="${1}"
. ./defs.sh
readonly bindir="${prefix}/bin"
readonly libdir="${prefix}/share/herdtools7"
mkdir -p "${bindir}"
mkdir -p "${libdir}"
cpbin () {
local sub="${1}"
local execs="${2}"
for exec in $execs
do
cp "_build/${sub}/${exec}" "${bindir}/$(basename $exec .native)7"
done
}
# Copy binaries
cpbin herd "$HERD"
cpbin litmus "$LITMUS"
cpbin tools "$TOOLS"
cpbin gen "$GEN"
cpbin jingle "$JINGLE"
# Copy libfiles
cpdir herd/libdir "${libdir}/herd"
cpdir litmus/libdir "${libdir}/litmus"
cpdir jingle/libdir "${libdir}/jingle"