Skip to content

Commit 2c9c4a3

Browse files
MAJOR BUG FIX: Scripting error corrected in watch services. Everything should now work flawlessly for everyone :)
1 parent ca2f342 commit 2c9c4a3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

calibre-web-automator/books-to-process-scan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
echo "STARTING NEW-BOOK-PROCESSING SCANNER"
88

99
# Folder to monitor, replace "/books/to_process" with the folder you want to monitor e.g. your download folder for books
10-
WATCH_FOLDER=grep -o '"ingest_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$'
10+
WATCH_FOLDER=$(grep -o '"ingest_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$')
1111
echo "Watching folder: $WATCH_FOLDER"
1212

1313
# Monitor the folder for new files

calibre-web-automator/calibre-scan.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
echo "STARTING CALIBRE SCANNER"
88

99
# Folder to monitor
10-
WATCH_FOLDER=grep -o '"import_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$'
10+
WATCH_FOLDER=$(grep -o '"import_folder": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$')
1111
echo "Watching folder: $WATCH_FOLDER"
1212

1313
# Calibre library path
14-
CALIBRE_LIBRARY=grep -o '"calibre_library_dir": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$'
14+
CALIBRE_LIBRARY=$(grep -o '"calibre_library_dir": "[^"]*' /etc/calibre-web-automator/dirs.json | grep -o '[^"]*$')
1515
echo "Calibre library: $CALIBRE_LIBRARY"
1616

1717
# Function to add new eBook to Calibre database

calibre-web-automator/setup-cwa.sh

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ NC='\033[0m' # No Color
77
# For help with S6 commands ect.: https://wiki.artixlinux.org/Main/S6
88

99
# Install required packages
10+
apt install -y xdg-utils
1011
apt install -y inotify-tools
1112
apt install -y python3
1213
apt install -y python3-pip
@@ -28,6 +29,7 @@ python3 $SCRIPT_DIR/setup.py
2829
mkdir /etc/calibre-web-automator
2930
cp "$SCRIPT_DIR/new-book-processor.py" /etc/calibre-web-automator/new-book-processor.py
3031
cp "$SCRIPT_DIR/dirs.json" /etc/calibre-web-automator/dirs.json
32+
rm "$SCRIPT_DIR/dirs.json"
3133
cp "$SCRIPT_DIR/check-cwa-install.sh" /etc/calibre-web-automator/check-cwa-install.sh
3234

3335
# Add aliases to .bashrc

0 commit comments

Comments
 (0)