Created
October 19, 2014 10:36
-
-
Save yuan3y/07262a13a79e451030a4 to your computer and use it in GitHub Desktop.
output a html directory to each folder, used for transmission daemon (after finishing downloads)
This file contains hidden or 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
#!/bin/bash | |
mybasepath=/down | |
mybaseurl=http://yuan3y.com/down/ | |
cd "$mybasepath"/ | |
while IFS="" read -r -d $'\000' dir | |
do | |
echo "$mybaseurl""$dir" && tree -shC -H "$mybaseurl""$dir" -T "<a href=\"$mybaseurl\">down</a>" -o "$dir"/index.html "$dir" | |
done < <(find . -type d -print0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment