Files
bin/ipad.sh
2010-07-04 16:53:21 +02:00

40 lines
785 B
Bash

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