From 8b782fa5e1eb7b12a56c61bf9ebf184258d85976 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 20 May 2018 22:44:33 +0200 Subject: [PATCH] add live-system files check --- src/func/check_config | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/func/check_config b/src/func/check_config index 0b1ccec..19eddeb 100755 --- a/src/func/check_config +++ b/src/func/check_config @@ -25,6 +25,37 @@ function check_config() { } + #check live-system files + if [ -f "$iso_source" ]; then + if [ -n "$iso_destination" ] && [ -d "${iso_destination%/*}" ]; then + # iso_source -> iso_destination + # iso_source -> squashfs [optinal] + else + if [ -n "$filesystem_source" ] && [ -d "${filesystem_source%/*}" ]; then + # iso_source -> squashfs + else + # ERROR + echo "No corect AIM in Settings" | tee -a "$log_file" + return 3 + fi + fi + else + if [ -f "$filesystem_source" ]; then + if [ -n "$iso_destination" ]; then + # ERROR + echo "only Squashfs source in Settings, cant creat ISO" | tee -a "$log_file" + return 3 + else + # squashfs -> squashfs + fi + else + # ERROR + echo "No corect Source in Settings" | tee -a "$log_file" + return 3 + fi + fi + + } #this func is standalone executable