-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathOpenSlide-3.4.1_install
executable file
·45 lines (34 loc) · 1.1 KB
/
OpenSlide-3.4.1_install
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
#!/usr/bin/env bash
###############################################
# Installing OpenSlide 3.4.1 library
#
# by Brian Alston July 2022
#
set -e
for i in ${includes_dir:=$(dirname $0 2>/dev/null)/includes}/{module_maker,require}_inc.sh; do . $i; done
require rcps-core/1.0.0
require compilers/gnu/4.9.2
require openjpeg/2.4.0/gnu-4.9.2
APPNAME=${APPNAME:-openslide}
VERSION=${VERSION:-3.4.1}
COMPILER_TAG=${COMPILER_TAG:-gnu-4.9.2}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/OpenSlide/v$VERSION/$COMPILER_TAG}
MD5=${MD5:-88cfe1e9133e206c4e88402b7d19df31}
SRC_ARCHIVE=${SRC_ARCHIVE:-https://github.com/openslide/openslide/releases/download/v${VERSION}/openslide-${VERSION}.tar.gz}
mkdir -p /dev/shm/$APPNAME
temp_dir=`mktemp -d -p /dev/shm/$APPNAME`
cd $temp_dir
wget $SRC_ARCHIVE
CHECKSUM=`md5sum ${APPNAME}-${VERSION}.tar.gz | awk '{print $1}'`
if [[ "$MD5" == "$CHECKSUM" ]]
then
tar -xvf ${APPNAME}-${VERSION}.tar.gz
cd ${APPNAME}-${VERSION}
./configure --prefix=${INSTALL_PREFIX}
make
make install
else
echo "Hash mismatch."
echo "Expected: $MD5"
echo "Got: $CHECKSUM"
fi