diff options
Diffstat (limited to 'drop.sh')
-rwxr-xr-x | drop.sh | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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 |