refactor: create symlinks condition
This commit is contained in:
parent
3dcc61847b
commit
53116bbe9b
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue