9 lines
510 B
Bash
Executable File
9 lines
510 B
Bash
Executable File
#!/bin/bash
|
|
# films_put.sh — the family copies its two films onto the „Filmek" share (SMB, user felhom; password in env PW).
|
|
cd /root/data/jellyfin/Filmek || exit 1
|
|
for d in */; do
|
|
f=$(ls "$d"*.mkv); smbclient //felhom.tester4.test/Filmek -U felhom --password="$PW" -m SMB3 \
|
|
-c "mkdir \"${d%/}\"; cd \"${d%/}\"; put \"$f\" \"$(basename "$f")\"" 2>&1 | grep -v "^Try\|^$" | tail -2
|
|
done
|
|
smbclient //felhom.tester4.test/Filmek -U felhom --password="$PW" -m SMB3 -c "recurse ON; ls" 2>&1 | grep -i mkv
|