download_tools.sh 2.6 KB
Newer Older
Michael Hanus's avatar
Michael Hanus committed
1
2
3
4
#!/bin/sh
# This shell script updates some tools by downloading the current version
# from the Curry package repository.
#
Michael Hanus's avatar
Michael Hanus committed
5
# Note that the execution of this script requires an already installed 'cypm'!
Michael Hanus's avatar
Michael Hanus committed
6

7
8
9
10
11
12
13
# use local Curry executable if it exists (e.g., we are inside the distro):
CURRYBIN=`pwd`/../bin/curry
if [ -x "$CURRYBIN" ] ; then
  CPMOPTS="-d curry_bin=$CURRYBIN"
else
  CPMOPTS=
fi
Michael Hanus's avatar
Michael Hanus committed
14
CPM="cypm $CPMOPTS"
15

Michael Hanus's avatar
Michael Hanus committed
16
17
18
##############################################################################
echo "Updating 'cpm'..."
mv cpm/Makefile Makefile.cpm  # keep old Makefile
19
mv cpm/vendor/cass/src/CASS/PackageConfig.curry CASS_PackageConfig.curry
Michael Hanus's avatar
Michael Hanus committed
20
rm -rf cpm
21
$CPM checkout cpm
Michael Hanus's avatar
Michael Hanus committed
22
23
24
25
26
27
28
cd cpm
rm -rf .git* bin package.json
make fetchdeps
rm -rf vendor/*/.git*
rm -rf dependencies.txt fetch-dependencies.sh Makefile
cd ..
mv Makefile.cpm cpm/Makefile
29
mv CASS_PackageConfig.curry cpm/vendor/cass/src/CASS/PackageConfig.curry
Michael Hanus's avatar
Michael Hanus committed
30
31
echo "'cpm' updated from package repository."

32
##############################################################################
33
34
echo "Updating 'optimize'..."
mv optimize/Makefile Makefile.optimize  # keep old Makefile
35
36
mv optimize/.cpm/packages/cass/src/CASS/PackageConfig.curry CASS_PackageConfig.curry
mv optimize/package.json optimize_package.json
37
rm -rf optimize
38
$CPM checkout transbooleq
39
40
mv transbooleq optimize
cd optimize
41
$CPM install --noexec
42
43
44
45
rm -rf .git*
rm -rf .cpm/*_cache
rm -rf .cpm/packages/*/.git*
cd .cpm/packages
46
47
48
49
50
51
 CANAV=`ls -d cass-analysis-*`
 mv $CANAV cass-analysis
 CASSV=`ls -d cass-*\.*\.*`
 mv $CASSV cass
 ln -s cass-analysis $CANAV
 ln -s cass $CASSV
Michael Hanus's avatar
Michael Hanus committed
52
53
54
 PKGV=`ls -d flatcurry-*`
 mv $PKGV flatcurry
 ln -s flatcurry $PKGV
Michael Hanus's avatar
Michael Hanus committed
55
56
57
 PKGV=`ls -d csv-*`
 mv $PKGV csv
 ln -s csv $PKGV
Michael Hanus's avatar
Michael Hanus committed
58
59
60
 PKGV=`ls -d xml-*`
 mv $PKGV xml
 ln -s xml $PKGV
Michael Hanus's avatar
Michael Hanus committed
61
62
63
 PKGV=`ls -d currypath-*`
 mv $PKGV currypath
 ln -s currypath $PKGV
Michael Hanus's avatar
Michael Hanus committed
64
65
66
 PKGV=`ls -d finite-map-*`
 mv $PKGV finite-map
 ln -s finite-map $PKGV
Michael Hanus's avatar
Michael Hanus committed
67
68
69
 PKGV=`ls -d propertyfile-*`
 mv $PKGV propertyfile
 ln -s propertyfile $PKGV
Michael Hanus's avatar
Michael Hanus committed
70
71
72
 PKGV=`ls -d queue-*`
 mv $PKGV queue
 ln -s queue $PKGV
Michael Hanus's avatar
Michael Hanus committed
73
74
75
76
77
78
 PKGV=`ls -d random-*`
 mv $PKGV random
 ln -s random $PKGV
 PKGV=`ls -d redblacktree-*`
 mv $PKGV redblacktree
 ln -s redblacktree $PKGV
Michael Hanus's avatar
Michael Hanus committed
79
80
81
 PKGV=`ls -d scc-*`
 mv $PKGV scc
 ln -s scc $PKGV
Michael Hanus's avatar
Michael Hanus committed
82
83
84
 PKGV=`ls -d socket-*`
 mv $PKGV socket
 ln -s socket $PKGV
Michael Hanus's avatar
Michael Hanus committed
85
86
87
 PKGV=`ls -d wl-pprint-*`
 mv $PKGV wl-pprint
 ln -s wl-pprint $PKGV
Michael Hanus's avatar
Michael Hanus committed
88
89
90
 PKGV=`ls -d frontend-exec-*`
 mv $PKGV frontend-exec
 ln -s frontend-exec $PKGV
91
92
93
cd ../..
cd ..
mv Makefile.optimize optimize/Makefile
94
95
mv CASS_PackageConfig.curry optimize/.cpm/packages/cass/src/CASS/PackageConfig.curry
mv optimize_package.json optimize/package.json
96
echo "'optimize' updated from package repository."