X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=save_movie;fp=save_movie;h=ce92e508a69cf6596f40a894b6b7373d650d2d9b;hb=c99a50a0fd63d9bb9eb0fa9d1232366e9e2d444f;hp=0000000000000000000000000000000000000000;hpb=842f828ffa6bc307d04b027a904ec293922355ff;p=videoscripts%2F.git diff --git a/save_movie b/save_movie new file mode 100755 index 0000000..ce92e50 --- /dev/null +++ b/save_movie @@ -0,0 +1,25 @@ +#!/bin/bash + +DROPBOX="/naspool/dropbox/New Movies" +ENCODED="/naspool/dropbox/Encoded" +MOVIE="$1" +CATEGORY=$2 + +if [[ -z $MOVIE ]] || [[ -z $CATEGORY ]]; then + echo "Usage: $0 " + exit 1 +fi + +if [[ ! -e "$MOVIE" ]]; then + echo "-E- Bad movie name: $MOVIE" + exit 1 +fi + +if [[ ! -d "$DROPBOX/$CATEGORY" ]] ; then + echo "-E- Unsupported category: $CATEGORY" + exit 1 +fi + +echo "-> Saving movie \"$MOVIE\" to our movie library: $CATEGORY" +mv "$MOVIE" "$DROPBOX/$CATEGORY" +