View Single Post
Old 09-27-2009, 09:03 AM   #3
rootto
Junior Member
rootto began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2009
Device: none
Thanks for your script. I forgot to say that I'm running ubuntu. This is the converted script:

Code:
#!/bin/dash

# Batch File to start a Calibre configuration on Windows
# giving explicit control of the location of:
# - Calibe Program Files
# - Calibre Library Files
# - Calibre Config Files
# - Calibre Metadata database
# By setting the paths correctly it can be used to run:
# - A "portable calibre" off a USB stick.
# - A network installation with local metadata database
# (for performance) and books stored on a network share

CalibreConfig=/home/`whoami`/.config/calibre
LIBRARY_DIR='/media/Nicola/Ebooks/'

export CALIBRE_CONFIG_DIRECTORY=$CalibreConfig
export CALIBRE_LIBRARY_DIRECTORY=$LIBRARY_DIR
export CALIBRE_OVERRIDE_DATABASE_PATH=$CalibreConfig'/metadata.db'

echo CONFIG=$CALIBRE_CONFIG_DIRECTORY
echo LIBRARY=$CALIBRE_LIBRARY_DIRECTORY
echo DATABASE=$CALIBRE_OVERRIDE_DATABASE_PATH

calibre --with-library $LIBRARY_DIR
but it doesn't work. I guess calibre it's not reading the evn variables.
The way I solved is to mount the share using the nobrl option:

Code:
mount -t cifs -o nobrl  //192.168.1.70/Nicola /media/Nicola
In this way the lock is not propagated to the server.
rootto is offline   Reply With Quote