diff --git a/lib/filefct.sh b/lib/filefct.sh index 3df9b70..effefb8 100644 --- a/lib/filefct.sh +++ b/lib/filefct.sh @@ -30,7 +30,10 @@ backupdist() for file in $@; do local tmstmp=$(stdtime) - if [[ -f ${file} ]]; then + if [[ - L ${file} ]]; then + # With symbolik links we call again backupdist to treat target + backupdist $(readlink -f ${file}) + elif [[ -f ${file} ]]; then prnt I "Création d'une sauvegarde de ${file} du $tmstmp..." cp -av $file ${file}.dist.${tmstmp} if [[ $? -ne 0 ]]; then @@ -80,12 +83,12 @@ installfile() fi done - # Empty for just to obtain the target which is the last element of the list + # Empty to just obtain the target which is the last element of the list for i in $filelist; do : done if [[ ! $i == /* ]]; then - prnt E "installfile(): Target must be on the root filesystem and fuul path must be provided." + prnt E "installfile(): Target must be on the root filesystem and full path must be provided." die 13 fi if [[ -d $(dirname $i) ]]; then