[arkdep] skip non-existing files from migration
Sometimes a file listed in migrate_files list does not exist. so skip it and avoid an error output.
This commit is contained in:
parent
01af8b14ce
commit
cadcca6d32
1 changed files with 2 additions and 1 deletions
3
arkdep
3
arkdep
|
@ -1040,8 +1040,9 @@ deploy () {
|
|||
if [[ ${#migrate_files[@]} -ge 1 ]] && [[ ! -n $ARKDEP_ROOT ]]; then
|
||||
printf '\e[1;34m-->\e[0m\e[1m Migrating local files to new deployment\e[0m\n'
|
||||
for file in ${migrate_files[@]}; do
|
||||
[ ! -f $file ] && continue
|
||||
printf "Copying $file\n"
|
||||
cp -r /$file $arkdep_dir/deployments/${data[0]}/rootfs/${file%/*}
|
||||
cp -r $file $arkdep_dir/deployments/${data[0]}/rootfs/${file%/*}
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue