forked from kunsi/dotfiles
add .bin/voc-mount to repo
This commit is contained in:
parent
b221b0574b
commit
1cbdbaedb9
1 changed files with 24 additions and 0 deletions
24
.bin/voc-mount
Executable file
24
.bin/voc-mount
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/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"
|
Loading…
Reference in a new issue