scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit 28760241f8746be4327949f5b2b446bf7c054f1e
parent b88f696d00dc0c723693a4c0f4340fea179ca3ac
Author: lostd <lostd@2f30.org>
Date:   Wed,  7 Aug 2013 04:01:11 +0300

spacing fixes

Diffstat:
Mdaemon | 2+-
Mmksub | 25+++++++++++++------------
Mmpdlen/Makefile | 4++--
3 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/daemon b/daemon @@ -4,7 +4,7 @@ # runs a job with its std streams closed and detaches from terminal if test -z $1; then - echo usage: $(basename $0) job; exit 1 + echo usage: $(basename $0) job && exit 1 fi (exec "$@" &) > /dev/null 2>&1 diff --git a/mksub b/mksub @@ -4,23 +4,24 @@ # the specified tv series filenames in the current directory if test -z "$1"; then - echo "usage: $(basename $0) "'"Title.of.Show"' - exit + echo "usage: $(basename $0) "'"Title.of.Show"' + exit fi pp="$1" tt=$(echo $pp | sed 's/\./ /g') +ddir=/tmp/web echo $pp for f in ${pp}.S??E??*.{avi,mp4,mkv}; do - if test "$(echo $f | grep '*')"; then continue; fi - s=$(echo $f | sed "s/.*S\(..\)E...*/\1/") - e=$(echo $f | sed "s/.*S..E\(..\).*/\1/") - x=$(echo $f | sed "s/.*\.//") - b=$(echo ~/downloads/"${tt}"*${s}x${e}*.srt) - echo -n "S${s}E${e}" - if test "$(echo $b | grep '*')"; then echo; continue; else - cp "$b" $(basename $f .$x).srt - echo " OK" - fi + if test "$(echo $f | grep '*')"; then continue; fi + s=$(echo $f | sed "s/.*S\(..\)E...*/\1/") + e=$(echo $f | sed "s/.*S..E\(..\).*/\1/") + x=$(echo $f | sed "s/.*\.//") + b=$(echo $ddir/"${tt}"*${s}x${e}*.srt) + echo -n "S${s}E${e}" + if test "$(echo $b | grep '*')"; then echo; continue; else + cp "$b" $(basename $f .$x).srt + echo " OK" + fi done diff --git a/mpdlen/Makefile b/mpdlen/Makefile @@ -1,6 +1,6 @@ -LDLIBS=-lmpdclient +LDLIBS = -lmpdclient -BIN=mpdlen +BIN = mpdlen all: $(BIN) clean: