2025-09-02 17:07:41 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2025-09-02 17:18:04 +02:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
2025-09-02 17:07:41 +02:00
|
|
|
from=$1
|
|
|
|
|
to=$2
|
|
|
|
|
|
|
|
|
|
mkdir -p "$to"
|
|
|
|
|
|
|
|
|
|
# użycie find z -print0, żeby prawidłowo obsłużyć spacje i dziwne znaki
|
|
|
|
|
find "$from" -type f -print0 | while IFS= read -r -d '' i; do
|
|
|
|
|
ln -s "$i" "$to/$(basename "$i")"
|
|
|
|
|
done
|