summaryrefslogtreecommitdiffstats
path: root/drop.sh
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-02-22 21:56:40 +0100
committerFlorian Pritz <f-p@gmx.at>2009-02-22 21:56:40 +0100
commitb5485475de82ac0743c37e3eb0c35e877f7213ff (patch)
tree23c4a52507a34ece514889b4888d627ec0e38a5c /drop.sh
parent1978be4439657a04d2e23227f5c66bb7d4124c18 (diff)
downloadbin-b5485475de82ac0743c37e3eb0c35e877f7213ff.tar.gz
bin-b5485475de82ac0743c37e3eb0c35e877f7213ff.tar.xz
updated
Diffstat (limited to 'drop.sh')
-rwxr-xr-xdrop.sh16
1 files changed, 11 insertions, 5 deletions
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