ipad.sh hinzu
This commit is contained in:
39
ipad.sh
Normal file
39
ipad.sh
Normal 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
|
||||
Reference in New Issue
Block a user