This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
rusty/rusty-server.sh
finninde 52819e712a Create rusty-server.sh
rusty server accepts commands and pushes them to queue
2014-08-31 23:38:50 +02:00

34 lines
589 B
Bash

#!/bin/bash
readonly PROGNAME="$(basename $0)"
readonly PROGDIR="$(readlink -m "(dirname $0)")"
readonly ARGS="$@"
main() {
local program=$1
local link=$2
local generatedLink
if [[ $program == "vis" ]];then
generatedLink=$(youtube-dl -g $link)
tee ~pvv/var/queue/$(uuidgen) <<- EOF
$program
mpv $generatedLink
EOF
else
tee ~pvv/var/queue/$(uuidgen) <<- EOF
$program
$ARGS
EOF
fi
}
usage() {
tee <<- EOF
EOF
}
main $ARGS
#this not best practice, going to sleep ZZzzz#!/bin/bash