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
|
|
|
|
|
2024-05-23 15:40:40 +00:00
|
|
|
sudo mount -t cifs -o "uid=${uid},password=" "//${device}/video" "/video"
|
|
|
|
sudo mount -t cifs -o "uid=${uid},password=" "//${device}/fuse" "/video/fuse"
|