Forked from sorrycc/upload_directory_to_xunlei_lixian.sh
Created
November 14, 2012 06:20
-
-
Save tywg001/4070625 to your computer and use it in GitHub Desktop.
上传目录下的所有 torrent 文件到迅雷离线
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# @fileoverview 上传目录下的所有 torrent 文件到迅雷离线. | |
# @author ChenCheng <[email protected]> | |
# @ref https://github.com/iambus/xunlei-lixian | |
# | |
tmpdir="path/to/tmp/directory"; | |
script="path/to/xunlei-lixian/lixian_cli.py" | |
if [ ! -d "$tmpdir" ]; then | |
mkdir -p "$tmpdir"; | |
fi | |
#python $script login | |
find ~/Downloads/ -name "*.torrent" | while read name; do | |
python $script add --torrent "$name" | |
mv "$name" "$tmpdir" | |
done | |
rm -rf "$tmpdir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment