Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Reisman committed Oct 22, 2024
1 parent 9825e2b commit 45e24e8
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Docker/liberate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ update_settings() {

is_mounted() {
DIR=$1
if mount | grep -q "${DIR}";
if grep -qs "${DIR} " /proc/mounts;
then
return 0
else
Expand Down Expand Up @@ -80,13 +80,6 @@ run() {
}

main() {
# TERM isn't set by default in docker images
if [[ -z ${TERM} || ${TERM} = "dumb" ]]; then
TERM=xterm-256color
fi

info ${TERM}

info "initializing libation"
init_config_file AccountsSettings.json
init_config_file Settings.json
Expand All @@ -98,7 +91,7 @@ main() {
info "loading database"
FILE=LibationContext.db
# If user provides a separate database mount, use that
if is_mounted ${LIBATION_DB_DIR};
if is_mounted "${LIBATION_DB_DIR}";
then
debug "using database directory ${LIBATION_DB_DIR}"
if [ -f "${LIBATION_DB_DIR}/${FILE}" ]; then
Expand All @@ -119,7 +112,7 @@ main() {
fi

# Try to warn if books dir wasn't mounted in
if ! is_mounted ${LIBATION_BOOKS_DIR};
if ! is_mounted "${LIBATION_BOOKS_DIR}";
then
warn "${LIBATION_BOOKS_DIR} does not appear to be mounted, books will not be saved"
fi
Expand Down

0 comments on commit 45e24e8

Please sign in to comment.