-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-zend.sh
executable file
·65 lines (53 loc) · 1.79 KB
/
update-zend.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
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
#!/bin/bash
#
# LICENCE
# This code is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# @author Edouard Simon <[email protected]>
# @copyright Copyright (c) 2013, OPUS 4 development team
# @license http://www.gnu.org/licenses/gpl.html General Public License
# @version $Id$
# Updates the ZendFramework library to Version 1.12.9
set -o errexit
DOWNLOADS_DIR="$OPUS_UPDATE_BASEDIR"/downloads
LIB_DIR="$OPUS_UPDATE_BASEDIR"/libs
NEW_ZEND_FOLDER='ZendFramework-1.12.9-minimal'
ZEND_LIB_URL='https://packages.zendframework.com/releases/ZendFramework-1.12.9/ZendFramework-1.12.9-minimal.tar.gz'
echo "Updating Zend-Framework to Version 1.12.9"
echo "$LIB_DIR/$NEW_ZEND_FOLDER"
if [ -d "$LIB_DIR/$NEW_ZEND_FOLDER" ];
then
echo "Zend-Framework Version 1.12.9 already installed. Nothing to do here."
exit 0
fi
if [ ! -d "$DOWNLOADS_DIR" ];
then
mkdir "$DOWNLOADS_DIR"
fi
if [ ! -d "$LIB_DIR" ];
then
echo "Library directory $LIB_DIR not found. Please check."
echo "NOT updating Zend-Framework!"
exit 1
fi
echo "Downloading Zend-Framework Version 1.12.9"
if ! wget -O "$DOWNLOADS_DIR"/zend.tar.gz "$ZEND_LIB_URL";
then
echo "Unable to download $ZEND_LIB_URL"
exit 1
fi
tar xzf "$DOWNLOADS_DIR/zend.tar.gz" -C "$LIB_DIR"
echo "Updating Symlink to Zend-Framework"
cd "$LIB_DIR"
rm ZendFramework
ln -svf ZendFramework-1.12.9-minimal ZendFramework
echo "done"
exit 0