-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-workspace.sh
executable file
·44 lines (34 loc) · 1.19 KB
/
update-workspace.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
#!/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 Jens Schwidder <[email protected]>
# @copyright Copyright (c) 2011, OPUS 4 development team
# @license http://www.gnu.org/licenses/gpl.html General Public License
# @version $Id$
# Updates workspace folder if necessary
set -o errexit;
source update-common.sh
setVars
# Remove workspace/files/error if present
FOLDER="$BASEDIR/workspace/files/error"
DEBUG "Updating workspace"
DEBUG "$FOLDER"
if [[ -d $FOLDER ]]; then
echo "Removing unused folder $FOLDER"
deleteFolder "$FOLDER"
echo "done"
fi
CACHE_DIR="$BASEDIR/workspace/cache"
echo -e "Cleaning Zend Cache ... \c "
find "$CACHE_DIR" -type f -name "zend_cache---*" -print0 |xargs -r0 rm -f
echo 'done'