mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
cleaning the commands cp on upgrade script
This commit is contained in:
parent
ce4fccfd27
commit
58e2a40af0
1 changed files with 12 additions and 12 deletions
|
@ -70,19 +70,19 @@ data=$final_path/data
|
||||||
skel_dist=$final_path/www/skel-dist
|
skel_dist=$final_path/www/skel-dist
|
||||||
|
|
||||||
if [ -d "$squelettes" ]; then
|
if [ -d "$squelettes" ]; then
|
||||||
cp -ar $squelettes /tmp/squelettes
|
cp -a "$squelettes" /tmp/squelettes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$bdd" ]; then
|
if [ -e "$bdd" ]; then
|
||||||
cp -a $bdd /tmp/association.sqlite
|
cp -a "$bdd" /tmp/association.sqlite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$data" ]; then
|
if [ -d "$data" ]; then
|
||||||
cp -ar $data /tmp/data
|
cp -a "$data" /tmp/data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$skel_dist" ]; then
|
if [ -d "$skel_dist" ]; then
|
||||||
cp -ar $skel_dist /tmp/skel-dist
|
cp -a "$skel_dist" /tmp/skel-dist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -106,12 +106,12 @@ then
|
||||||
|
|
||||||
if [ -d "$backup_squelettes" ]
|
if [ -d "$backup_squelettes" ]
|
||||||
then
|
then
|
||||||
cp -ar $backup_squelettes $final_path/www/squelettes
|
cp -a "$backup_squelettes" $final_path/www/squelettes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$backup_bdd" ]
|
if [ -e "$backup_bdd" ]
|
||||||
then
|
then
|
||||||
cp -a $backup_bdd $final_path/association.sqlite
|
cp -a "$backup_bdd" $final_path/association.sqlite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
|
@ -153,12 +153,12 @@ then
|
||||||
|
|
||||||
if [ -d "$backup_squelettes" ]
|
if [ -d "$backup_squelettes" ]
|
||||||
then
|
then
|
||||||
cp -ar $backup_squelettes $final_path/www/squelettes
|
cp -a "$backup_squelettes" $final_path/www/squelettes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$backup_bdd" ]
|
if [ -e "$backup_bdd" ]
|
||||||
then
|
then
|
||||||
cp -a $backup_bdd $final_path/association.sqlite
|
cp -a "$backup_bdd" $final_path/association.sqlite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
|
@ -227,25 +227,25 @@ backup_skel_dist=/tmp/skel-dist
|
||||||
|
|
||||||
if [ -d "$backup_squelettes" ]
|
if [ -d "$backup_squelettes" ]
|
||||||
then
|
then
|
||||||
cp -ar $backup_squelettes $final_path/www/squelettes
|
cp -a "$backup_squelettes" $final_path/www/squelettes
|
||||||
ynh_secure_remove $backup_squelettes
|
ynh_secure_remove $backup_squelettes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$backup_bdd" ]
|
if [ -e "$backup_bdd" ]
|
||||||
then
|
then
|
||||||
cp -a $backup_bdd $final_path/association.sqlite
|
cp -a "$backup_bdd" $final_path/association.sqlite
|
||||||
ynh_secure_remove $backup_bdd
|
ynh_secure_remove $backup_bdd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$backup_data" ]
|
if [ -d "$backup_data" ]
|
||||||
then
|
then
|
||||||
cp -ar $backup_data $final_path/data
|
cp -a "$backup_data" $final_path/data
|
||||||
ynh_secure_remove $backup_data
|
ynh_secure_remove $backup_data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$backup_skel_dist" ]
|
if [ -d "$backup_skel_dist" ]
|
||||||
then
|
then
|
||||||
cp -ar $backup_skel_dist $final_path/www/skel-dist
|
cp -a "$backup_skel_dist" $final_path/www/skel-dist
|
||||||
ynh_secure_remove $backup_skel_dist
|
ynh_secure_remove $backup_skel_dist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue