29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
BACKUP_DIR="/var/backup/creolelocal"
|
|
echo -e "\n# personnalisations locales (dictionnaires/patch/templates)"
|
|
echo -e " Sauvegarde dans ${BACKUP_DIR}"
|
|
mkdir -p ${BACKUP_DIR}/distrib
|
|
mkdir -p ${BACKUP_DIR}/dicos
|
|
mkdir -p ${BACKUP_DIR}/patch
|
|
# dictionnaires locaux
|
|
/bin/cp -rf /usr/share/eole/creole/dicos/local/*.xml ${BACKUP_DIR}/dicos/ >/dev/null 2>&1
|
|
# si enregistré sur Zéphir : suppression des dictionnaires locaux/de variante
|
|
# limite les problèmes avec creoled (cf https://dev-eole.ac-dijon.fr/issues/9787)
|
|
/usr/bin/enregistrement_zephir --check >/dev/null
|
|
if [ $? -eq 0 ]
|
|
then
|
|
/bin/rm -f /usr/share/eole/creole/dicos/local/*.xml
|
|
/bin/rm -f /usr/share/eole/creole/dicos/variante/*.xml
|
|
fi
|
|
# patchs
|
|
/bin/cp -rf /usr/share/eole/creole/patch/*.patch ${BACKUP_DIR}/patch/ >/dev/null 2>&1
|
|
# templates non installés par un paquet (variante et locaux)
|
|
for TMPL in `ls /usr/share/eole/creole/distrib/*`
|
|
do
|
|
dpkg -S $TMPL >/dev/null 2>&1
|
|
if [ $? -ne 0 ];then
|
|
/bin/cp -rf $TMPL ${BACKUP_DIR}/distrib/
|
|
fi
|
|
done
|