I have NickelMenu 0.5.4 on a Kobo Clara HD with firmware 4.38.23038.
I have the following in my NickelMenu config:
Code:
menu_item :main :Dropbox Pull :nickel_wifi :enable
chain_success :nickel_wifi :autoconnect_silent
chain_success :cmd_spawn :quiet :/mnt/onboard/.adds/rclone/sync.sh
chain_success :nickel_misc :rescan_books_full
chain_failure :dbg_toast :Failure!
In
sync.sh I have:
Code:
#!/bin/sh
# Constants
readonly rclone_dir="/mnt/onboard/.adds/rclone"
readonly rclone_remote="Dropbox:"
readonly book_library="/mnt/onboard/Books"
# Start sync
qndb -m mwcToast 1000 'Starting Dropbox download...'
if ! "$rclone_dir/rclone" \
--ca-cert "$rclone_dir/cacert.pem" \
--log-file "$rclone_dir/rclone.log" \
--ignore-checksum --size-only \
--verbose \
copy "$rclone_remote" "$book_library"
then
qndb -m mwcToast 8000 "Error in download!"
exit 1
fi
qndb -m pfmRescanBooksFull
You'll notice I'm using
qndb (from NickelDBus) to show a message and rescan books. I would like to uninstall NickelDBus and use just NickelMenu, but the issue is that the config above does not work as desired:
cmd_spawn triggers and runs fine but for NickelMenu chaining purposes it returns immediately and rescans the library too soon.
I also tried
cmd_output but that just seemed to wait the full timeout and then error, before even trying to run the script (this is apparent from reading the log while it's happening)
Finally, I also tried not using a script and running rclone directly in the
cmd_spawn, but that also exited too soon.
Again,
sync.sh does run and complete as expected, it is only in the context of NickelMenu that it's going to the next action before it should.