From b5485475de82ac0743c37e3eb0c35e877f7213ff Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 22 Feb 2009 21:56:40 +0100 Subject: updated --- drop.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'drop.sh') diff --git a/drop.sh b/drop.sh index 848cd31..c37106a 100755 --- a/drop.sh +++ b/drop.sh @@ -1,5 +1,11 @@ -#!/bin/sh -if echo "$1" | grep ".torrent$" > /dev/null -then - mv "$1" /mnt/mistral/flo/torrent/watch -fi +#!/bin/bash +for file; do + case $(file -b --mime-type "$file") in + application/x-bittorrent) + mv "$file" /mnt/mistral/flo/torrent/watch + ;; + *) + # nothing + ;; + esac +done -- cgit v1.2.3-24-g4f1b