consolidate and templeate my to files

in order to stop maintainung different files for each operationg system
This commit is contained in:
Philip Henning 2021-09-11 23:45:56 +02:00
parent 7a1e8fda4b
commit c377eb276a
40 changed files with 246 additions and 454 deletions

View file

@ -1,17 +1,17 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then
echo "Usage: $0 <player> <event> <talk-id>"
echo "e.g.: $0 vlc 35c3 9766"
if [[ -z "${1}" ]] || [[ -z "${2}" ]] || [[ -z "${3}" ]]; then
echo "Usage: ${0} <player> <event> <talk-id>"
echo "e.g.: ${0} vlc 35c3 9766"
exit 1
fi
mediainfo /video/video/encoded/$2/$3-hd.mp4
mediainfo /video/video/encoded/${2}/${3}-hd.mp4
read -p "Press any key to continue... " -n1 -s
$1 /video/video/encoded/$2/$3-hd.mp4
${1} /video/video/encoded/${2}/${3}-hd.mp4

View file

@ -1,12 +1,12 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
if [[ -z "$1" ]]; then
if [[ -z "${1}" ]]; then
echo "Filepath missing."
exit 1
fi
rsync --verbose --progress --inplace $1 /tmp/
rsync --verbose --progress --inplace ${1} /tmp/

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "Usage: $0 <event> <talk-id>"
echo "e.g.: $0 35c3 9766"
if [[ -z "${1}" ]] || [[ -z "${2}" ]]; then
echo "Usage: ${0} <event> <talk-id>"
echo "e.g.: ${0} 35c3 9766"
exit 1
fi
kdenlive /video/fuse/$1/*/$2/project.kdenlive
kdenlive /video/fuse/${1}/*/${2}/project.kdenlive

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "Usage: $0 <event> <talk-id>"
echo "e.g.: $0 35c3 9766"
if [[ -z "${1}" ]] || [[ -z "${2}" ]]; then
echo "Usage: ${0} <event> <talk-id>"
echo "e.g.: ${0} 35c3 9766"
exit 1
fi
ls -lah --color=tty /video/fuse/$1/*/$2/
ls -lah --color=tty /video/fuse/${1}/*/${2}/

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "Usage: $0 <event> <talk-id>"
echo "e.g.: $0 35c3 9766"
if [[ -z "${1}" ]] || [[ -z "${2}" ]]; then
echo "Usage: ${0} <event> <talk-id>"
echo "e.g.: ${0} 35c3 9766"
exit 1
fi
mpv /video/fuse/$1/*/$2/uncut.ts
mpv /video/fuse/${1}/*/${2}/uncut.ts

View file

@ -1,23 +1,23 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
if [[ $UID -ne 0 ]]; then
if [[ ${UID} -ne 0 ]]; then
echo "You have to run this script as root!"
exit 1
fi
options=( storage aws umount )
if [[ -z "$1" ]]; then
echo "Usage: $0 <project>"
echo "e.g.: $0 c3"
if [[ -z "${1}" ]]; then
echo "Usage: ${0} <project>"
echo "e.g.: ${0} c3"
echo " "
echo "Valid options:"
for i in "${options[@]}"; do
echo " - $i"
echo " - ${i}"
done
fi
@ -25,28 +25,28 @@ fuse="/video/fuse"
video="/video/video"
tmp="/video/tmp"
if mount | grep $fuse > /dev/null; then
umount $fuse
if mount | grep ${fuse} > /dev/null; then
umount ${fuse}
fi
if mount | grep $video > /dev/null; then
umount $video
if mount | grep ${video} > /dev/null; then
umount ${video}
fi
if mount | grep $tmp > /dev/null; then
umount $tmp
if mount | grep ${tmp} > /dev/null; then
umount ${tmp}
fi
case $1 in
case ${1} in
storage)
mount.cifs //storage.lan.c3voc.de/fuse $fuse -o rw,guest -o uid=phg
mount.cifs //storage.lan.c3voc.de/video $video -o rw,guest -o uid=phg
mount.cifs //storage.lan.c3voc.de/tmp $tmp -o rw,guest -o uid=phg
mount.cifs //storage.lan.c3voc.de/fuse ${fuse} -o rw,guest -o uid=phg
mount.cifs //storage.lan.c3voc.de/video ${video} -o rw,guest -o uid=phg
mount.cifs //storage.lan.c3voc.de/tmp ${tmp} -o rw,guest -o uid=phg
;;
aws)
mount.cifs //aws.lan.c3voc.de/fuse $fuse -o rw,guest -o uid=phg
mount.cifs //aws.lan.c3voc.de/video $video -o rw,guest -o uid=phg
mount.cifs //aws.lan.c3voc.de/tmp $tmp -o rw,guest -o uid=phg
mount.cifs //aws.lan.c3voc.de/fuse ${fuse} -o rw,guest -o uid=phg
mount.cifs //aws.lan.c3voc.de/video ${video} -o rw,guest -o uid=phg
mount.cifs //aws.lan.c3voc.de/tmp ${tmp} -o rw,guest -o uid=phg
;;
umount)
;;
@ -54,6 +54,6 @@ case $1 in
echo "Mountpoint does not exist."
echo "Please use one of the following:"
for i in "${options[@]}"; do
echo " - $i"
echo " - ${i}"
done
esac