refactor: create symlinks condition

This commit is contained in:
hesam-init 2024-03-24 14:26:52 +03:30
parent 3dcc61847b
commit 53116bbe9b

View file

@ -10,7 +10,10 @@ create_symlinks() {
fi
for item in "$source_dir"/* "$source_dir"/.*; do
[ -e "$item" ] && [ "$item" != "$source_dir/." ] && [ "$item" != "$source_dir/.." ] && ln -sfn "$item" "$target_dir/"
if [ -e "$item" ] && [ "$item" != "$source_dir/." ] && [ "$item" != "$source_dir/.." ]; then
echo "$item ===> $target_dir"
ln -sfn "$item" "$target_dir/"
fi
done
}