summaryrefslogtreecommitdiffstats
path: root/FUNCTIONS
diff options
context:
space:
mode:
authorEric Sandall2008-08-09 17:33:28 -0700
committerEric Sandall2008-08-09 17:33:28 -0700
commit4992c8d6f77dc0da3fa0e6f46e2cd37250ec4b8d (patch)
tree75089029cb8a039eeb96f8b932bbafd74193eca5 /FUNCTIONS
parent285191eef3aa1686fb82d1014312b13e52d766ce (diff)
FUNCTIONS: install_www_files now installs to a versioned directory so as
not to overwrite older versions which (may) need to go through an upgrade procedure first
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-xFUNCTIONS12
1 files changed, 6 insertions, 6 deletions
diff --git a/FUNCTIONS b/FUNCTIONS
index f854259a4a..a8d98f7fb4 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -191,7 +191,7 @@ function get_install_www_files_dir ()
## @param Directory with files we might want to install
## @param Destination directory (optional)
##
-## Installs files to WWW_DEST ($INSTALL_ROOT/usr/share/www/$SPELL) and
+## Installs files to WWW_DEST ($INSTALL_ROOT/usr/share/www/$SPELL-$VERSION) and
## sets up proper www-data permissions
## Optionally the second parameter will override WWW_DATA (and make
## sure INSTALL_ROOT exists only once in the WWW_DATA)
@@ -204,7 +204,7 @@ function install_www_files ()
#
local WWW_DEST="$INSTALL_ROOT/${2/\$INSTALL_ROOT/}"
else
- local WWW_DEST="$INSTALL_ROOT$(get_install_www_files_dir)$SPELL"
+ local WWW_DEST="$INSTALL_ROOT$(get_install_www_files_dir)$SPELL-$VERSION"
fi &&
#
@@ -216,10 +216,10 @@ function install_www_files ()
# Make sure WWW_DEST exists
#
if [ ! -d "$WWW_DEST" ]; then
- if [ ! -d "${WWW_DEST/\/$SPELL/}" ]; then
- mkdir -p "${WWW_DEST/\/$SPELL/}" &&
- chmod 0755 "${WWW_DEST/\/$SPELL/}" &&
- chown www-data:www-data "${WWW_DEST/\/$SPELL/}"
+ if [ ! -d "${WWW_DEST/\/$SPELL-$VERSION/}" ]; then
+ mkdir -p "${WWW_DEST/\/$SPELL-$VERSION/}" &&
+ chmod 0755 "${WWW_DEST/\/$SPELL-$VERSION/}" &&
+ chown www-data:www-data "${WWW_DEST/\/$SPELL-$VERSION/}"
fi &&
mkdir -p "$WWW_DEST" &&