dotfiles/.bin/voc-mount

25 lines
453 B
Text
Raw Normal View History

2021-09-18 15:41:22 +00:00
#!/bin/bash
# mount a voc encoder or minion to /video
device=$1
[[ -n "$DEBUG" ]] && set -x
set -euo pipefail
uid="$(id -u)"
if [[ -z "$device" ]]
then
echo "Usage: $0 <device>" >&2
exit 1
fi
if ! [[ -d "/video/fuse" ]]
then
sudo mkdir -p "/video/fuse"
fi
sudo mount -t cifs -o "uid=${uid},password=" "//${device}.lan.c3voc.de/video" "/video"
sudo mount -t cifs -o "uid=${uid},password=" "//${device}.lan.c3voc.de/fuse" "/video/fuse"