19 lines
298 B
Plaintext
19 lines
298 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
|
||
|
function cleanup {
|
||
|
fusermount -u "$library"
|
||
|
rm -rf "$library"
|
||
|
}
|
||
|
|
||
|
if [ -z "$1" ]; then
|
||
|
echo "USAGE: $0 host:path"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
library=$(mktemp -p /tmp -d calibre-remote.XXXXXXXXXX)
|
||
|
sshfs "$1" "$library"
|
||
|
trap cleanup EXIT INT TERM
|
||
|
|
||
|
calibre --with-library="$library"
|