mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-22 16:33:48 +01:00
upgradeFromGit/theme : added support to linking original theme files to avoid copying of files.
This commit is contained in:
parent
b0a8bd44bd
commit
18de43b52f
2 changed files with 64 additions and 2 deletions
|
@ -9,6 +9,11 @@ LOG_FILE="$ROOT_DIR/upgrade.log"
|
|||
# The theme name to install (optional)
|
||||
#THEME="mytheme"
|
||||
|
||||
# The theme name in reference for template/CSS/image files
|
||||
THEME_TPL_REF="default"
|
||||
THEME_CSS_REF="default"
|
||||
THEME_IMG_REF="default"
|
||||
|
||||
# Do doc export ?
|
||||
BUILD_DOC=1
|
||||
|
||||
|
|
|
@ -156,13 +156,70 @@ do
|
|||
msg "file does not exist. Pass..."
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$THEME" != "" ]
|
||||
then
|
||||
msg "-> Install theme : " -en
|
||||
msg "-> Install theme : "
|
||||
|
||||
# TPL
|
||||
msg "\t- Template : " -e
|
||||
ln -s $LOCAL_SAV_DIR/theme/templates $ROOT_DIR/public_html/templates/$THEME >> $LOG_FILE 2>&1
|
||||
if [ -d $ROOT_DIR/public_html/templates/$THEME_TPL_REF ]
|
||||
then
|
||||
msg "\t\t-> Vérification de la présence des fichiers : " -e
|
||||
for i in $ROOT_DIR/public_html/templates/$THEME_TPL_REF/*
|
||||
do
|
||||
f=`basename $i`
|
||||
msg "\t\t\t- $f : " -en
|
||||
if [ -f $ROOT_DIR/public_html/templates/$THEME/$f ]
|
||||
then
|
||||
msg "present."
|
||||
else
|
||||
ln -s $ROOT_DIR/public_html/templates/$THEME_TPL_REF/$f $ROOT_DIR/public_html/templates/$THEME/$f
|
||||
msg "link."
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# IMG
|
||||
msg "\t- Images : " -e
|
||||
ln -s $LOCAL_SAV_DIR/theme/images $ROOT_DIR/public_html/images/$THEME >> $LOG_FILE 2>&1
|
||||
if [ -d $ROOT_DIR/public_html/images/$THEME_IMG_REF ]
|
||||
then
|
||||
msg "\t\t-> Vérification de la présence des fichiers : " -e
|
||||
for i in $ROOT_DIR/public_html/images/$THEME_IMG_REF/*
|
||||
do
|
||||
f=`basename $i`
|
||||
msg "\t\t\t- $f : " -en
|
||||
if [ -f $ROOT_DIR/public_html/images/$THEME/$f ]
|
||||
then
|
||||
msg "present."
|
||||
else
|
||||
ln -s $ROOT_DIR/public_html/images/$THEME_IMG_REF/$f $ROOT_DIR/public_html/images/$THEME/$f
|
||||
msg "link."
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# CSS
|
||||
msg "\t- CSS : " -e
|
||||
ln -s $LOCAL_SAV_DIR/theme/css $ROOT_DIR/public_html/css/$THEME >> $LOG_FILE 2>&1
|
||||
msg "Ok"
|
||||
if [ -d $ROOT_DIR/public_html/css/$THEME_CSS_REF ]
|
||||
then
|
||||
msg "\t\t-> Vérification de la présence des fichiers : " -e
|
||||
for i in $ROOT_DIR/public_html/css/$THEME_CSS_REF/*
|
||||
do
|
||||
f=`basename $i`
|
||||
msg "\t\t\t- $f : " -en
|
||||
if [ -f $ROOT_DIR/public_html/css/$THEME/$f ]
|
||||
then
|
||||
msg "present."
|
||||
else
|
||||
ln -s $ROOT_DIR/public_html/css/$THEME_CSS_REF/$f $ROOT_DIR/public_html/css/$THEME/$f
|
||||
msg "link."
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $BUILD_DOC -eq 1 ]
|
||||
|
|
Loading…
Reference in a new issue