From a8a57e1ef0fb95703389b89e9822ab75ba1b6e24 Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Thu, 10 Aug 2017 17:44:11 -0400 Subject: [PATCH] Small bugfixes in groomer scripts --- circlean_fs/root_partition/opt/groomer/groomer.sh | 4 +++- circlean_fs/root_partition/opt/groomer/mount_dest.sh | 2 +- circlean_fs/root_partition/opt/groomer/music.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/circlean_fs/root_partition/opt/groomer/groomer.sh b/circlean_fs/root_partition/opt/groomer/groomer.sh index 3014157..6fb817d 100755 --- a/circlean_fs/root_partition/opt/groomer/groomer.sh +++ b/circlean_fs/root_partition/opt/groomer/groomer.sh @@ -69,7 +69,9 @@ run_groomer() { # echo "==== Done with /media/${SRC} to ${target_dir}. ====" >> "${logfile}" # List destination files (recursively) for debugging - # ls -lR "${target_dir}" + if [ "${DEBUG}" = true ]; then + ls -lR "${target_dir}" + fi else # Previous command (mounting current partition) failed echo "GROOMER: Unable to mount ${partition} on /media/${SRC}" diff --git a/circlean_fs/root_partition/opt/groomer/mount_dest.sh b/circlean_fs/root_partition/opt/groomer/mount_dest.sh index 08f8bf6..9fba305 100755 --- a/circlean_fs/root_partition/opt/groomer/mount_dest.sh +++ b/circlean_fs/root_partition/opt/groomer/mount_dest.sh @@ -13,7 +13,7 @@ clean(){ pumount "${SRC}" pumount "${DST}" exit - } +} check_not_root() { if ! [ "${ID}" -ge "1000" ]; then diff --git a/circlean_fs/root_partition/opt/groomer/music.sh b/circlean_fs/root_partition/opt/groomer/music.sh index de43f19..fc52eec 100755 --- a/circlean_fs/root_partition/opt/groomer/music.sh +++ b/circlean_fs/root_partition/opt/groomer/music.sh @@ -11,7 +11,7 @@ run_timidity() { while true; do # -id flags set interface to "dumb" and -qq silences most/all terminal output "${TIMIDITY}" -idqq "${files[RANDOM % ${#files[@]}]}" -done + done } main() {