2023-06-07 13:21:53 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
create_directories() {
|
|
|
|
workdir="$(mktemp -d)"
|
|
|
|
mkdir -p "$workdir/source"
|
|
|
|
mkdir -p "$workdir/dest"
|
|
|
|
mkdir -p "$workdir/restore"
|
2023-06-07 21:53:14 +02:00
|
|
|
# generate a filename with every possible byte in it to test
|
|
|
|
# escaping, the only character not included is `/` since that is
|
|
|
|
# illegal for filenames (obviously)
|
|
|
|
echo 'Hello World!' > "$workdir/source/$(for i in $(seq 0 255); do printf '%x' "$i" | xxd -r -p; done | tr -d '/')"
|
2023-06-07 13:21:53 +02:00
|
|
|
echo "$workdir"
|
|
|
|
}
|