forked from herd/herdtools7
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdune-install.sh
More file actions
executable file
·42 lines (32 loc) · 826 Bytes
/
dune-install.sh
File metadata and controls
executable file
·42 lines (32 loc) · 826 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
#!/bin/sh
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}"
readonly libdir="${prefix}/share/herdtools7"
. ./defs.sh
cpdir () {
if [ "$#" -ne 2 ]
then
echo "Usage: cpdir <from> <to>"
exit 1
fi
local from="${1}"
local to="${2}"
rm -rf "${to}" && mkdir -p "${to}" && ( cd "${from}" && cp -r . "${to}" )
}
# Copy binaries
dune install herdtools7 --prefix "${prefix}"
# Copy libfiles
cpdir herd/libdir "${libdir}/herd"
cpdir tools/libdir/. "${libdir}/tools"
cpdir litmus/libdir "${libdir}/litmus"
cpdir jingle/libdir "${libdir}/jingle"