public
Description: A Fuse filesystem for your friends' files on Pownce
Homepage: http://rcrowley.org/2008/03/22/powncefs/
Clone URL: git://github.com/rcrowley/powncefs.git
powncefs / mp3plz
100755 32 lines (28 sloc) 0.601 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
 
#
# mp3plz
# Richard Crowley <r@rcrowley.org>
#
# Use PownceFS to download all of the MP3s your friends have uploaded.
#
 
if [ -z "$1" ] ; then
echo "Usage: $0 <mountpoint> <destination>"
exit
fi
if [ -z "$2" ] ; then
echo "Usage: $0 <mountpoint> <destination>"
exit
fi
MNT=$1
DEST=$2
 
for friend in $(ls -1 $MNT) ; do
echo "[mp3plz] copying MP3s uploaded by $friend"
mkdir -p $DEST/$friend
find $MNT/$friend -name '*.mp3' | while read file ; do
echo "[mp3plz] copying $file"
dest=`echo $file | sed "s/$MNT/$DEST/"`
cp "$file" "$dest"
chmod 644 "$dest"
sleep 10
done
done