-
Notifications
You must be signed in to change notification settings - Fork 27
/
FoldX-4.0_install
executable file
·68 lines (55 loc) · 1.52 KB
/
FoldX-4.0_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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
###############################################
# Installing FoldX 4.0 as a reserved application.
#
# by Brian Alston March 2022
#
# updated Mach 2024 for different directory layout in ccspap2
# Install archive downloaded from:
# https://foldxsuite.crg.eu/ license portal and copied to:
#
# ~ccspap2/Software/FoldX
#
# on Myriad only.
NAME=${NAME:-FoldX}
VERSION=${VERSION:-v4.0}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/$NAME/$VERSION}
SRC_ARCHIVE=${SRC_ARCHIVE:-/home/ccspap2/Software/FoldX/4.0/foldxLinux64_0.zip}
APP_GROUP=${APP_GROUP:-legfldx}
set -e
if [ ! -f $SRC_ARCHIVE ]
then
echo ""
echo "*** ERROR: Cannot find FoldX installer archive"
echo ""
echo "You need to download the FoldX installer archive from:"
echo "https://foldxsuite.crg.eu/ license portal -"
echo "Place it somewhere in your file-system and set the SRC_ARCHIVE"
echo "variable appropriately."
echo ""
exit 1
fi
# Check we are using the correct userid
if [ "$USER" != "ccspap2" ]
then
echo ""
echo "*** ERROR: must install using the ccspap2 account."
echo ""
exit 1
fi
# Binary install
mkdir -p $INSTALL_PREFIX
cd $INSTALL_PREFIX
/bin/rm -rf *
unzip -x $SRC_ARCHIVE
# The binary incudes the license expiry date in the name. Set up a link to keep the same name as
# before.
binary=`ls foldx*`
ln -s $binary foldx
# Convert to reserved app.
cd ..
chgrp -R $APP_GROUP `basename $INSTALL_PREFIX`
chmod -R o-rwx `basename $INSTALL_PREFIX`
cd $INSTALL_PREFIX
chmod ug+rx $binary
ls -l