ipad.sh hinzu

This commit is contained in:
marc
2010-07-04 16:53:21 +02:00
parent 945f06e67f
commit 7406e43678

39
ipad.sh Normal file
View File

@@ -0,0 +1,39 @@
ipaddir=/dat/ipad
rm -rf /dat/ipad/*
# taz
tazdir=/dat/books/taz
files=$(ls $tazdir/*.epub)
dstdir=$ipaddir/books/taz/
mkdir -p $dstdir
for f in $files; do
if [ ! -e "$dstdir/$f" ]; then
ln -s "$f" $dstdir
fi
done
# Bücher dropbox
filedir="/home/marc/Dropbox/Elektronische Bücher (1)"
dstdir=$ipaddir/books
find "$filedir/" -iname "*.epub" -print0 | while read -d $'\0' f
do
if [ ! -e "$dstdir/$f" ]; then
ln -s "$f" $dstdir
fi
done
# Bücher dropbox
filedir="/home/marc/Dropbox/Elektronische Bücher (1)"
dstdir=$ipaddir/books
find "$filedir/" -iname "*.pdf" -print0 | while read -d $'\0' f
do
b=$filedir/$(basename "$dstdir/$f" .pdf)
#echo $b
if [ ! -e "$b.epub" ]; then
if [ ! -e "$dstdir/$f" ]; then
ln -s "$f" $dstdir
fi
fi
done