]> Git — Sourcephile - julm/podcasts.git/blob - send-key.sh
init
[julm/podcasts.git] / send-key.sh
1 #!/usr/bin/env bash
2 # shellcheck disable=SC2064
3 set -eux
4
5 cd "${0%/*}"
6
7 dev=/dev/disk/by-uuid/1AEC-F13E
8 mnt=$(mktemp -d)
9 mkdir -p "$mnt"
10 sudo umount "$dev" || true
11 trap "sudo umount $mnt && rmdir $mnt && sync" EXIT
12 sudo mount -v -o uid="$USER",fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush "$dev" "$mnt"
13
14 #./copy-new.sh
15
16 rsync -rv \
17 --exclude "*.part" \
18 --exclude "*.aria2" \
19 --exclude "/audio/RadioFrance/LaSérieDocumentaire/*" \
20 --include "/audio/SmashingSecurity/2021-*" \
21 --exclude "/audio/SmashingSecurity/*" \
22 --include "/audio/NakedSecurity/2021-*" \
23 --exclude "/audio/NakedSecurity/*" \
24 --include "/audio/FOSSAndCrafts/2021-*" \
25 --exclude "/audio/FOSSAndCrafts/*" \
26 --exclude ".*" \
27 --no-inc-recursive --info=progress2 \
28 --size-only --inplace --partial --progress -i \
29 new/audio \
30 "$mnt"/