forked from herd/herdtools7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefs.sh
35 lines (28 loc) · 1.37 KB
/
defs.sh
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
set -o errexit
HERD="herd.native"
LITMUS="litmus.native klitmus.native"
TOOLS="mfind.native moutcomes.native splitcond.native mshowhashes.native mlog2cond.native mflags.native mdiag.native recond.native mcycles.native mmixer.native knames.native mdiff.native mcmp.native madd.native mtopos.native mfilter.native mapply.native mcompare.native mhash.native mrcu.native mprog.native mnames.native ksort.native mobserved.native msort.native msum.native mselect.native mcond.native mproj.native rehash.native splitdot.native mlock.native mtrue.native mlisa2c.native cat2html.native mlog2name.native"
GEN="readRelax.native atoms.native dont.native diycross.native mexpand.native atomize.native diyone.native nexts.native classify.native diy.native norm.native"
JINGLE="jingle.native gen_theme.native"
NATIVE="$HERD $LITMUS $TOOLS $GEN $JINGLE"
mk_exe () {
D=$1
shift
for n
do
echo $n | sed -e "s|\(.*\).native|$D/\1.exe|g"
done
}
EXE="$(mk_exe herd $HERD) $(mk_exe litmus $LITMUS) $(mk_exe gen $GEN) $(mk_exe jingle $JINGLE) $(mk_exe tools $TOOLS)"
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}" )
}
VERSION=$(grep "^version:" herdtools7.opam | cut -d ":" -f 2 | cut -d '"' -f 2)
REV=$(git rev-parse HEAD 2>/dev/null || echo exported)