summaryrefslogtreecommitdiffstats
path: root/drop.sh
diff options
context:
space:
mode:
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