diff --git a/kiauh.ini b/kiauh.ini index 71c376d..b23a238 100644 --- a/kiauh.ini +++ b/kiauh.ini @@ -3,5 +3,4 @@ backup_before_update=false previous_origin_state=0 previous_smoothing_state=0 previous_shaping_state=0 -previous_moonraker_state=0 -previous_dev_moonraker_state=0 \ No newline at end of file +logupload_accepted=false \ No newline at end of file diff --git a/kiauh.sh b/kiauh.sh index 194f157..b57d11b 100755 --- a/kiauh.sh +++ b/kiauh.sh @@ -2,14 +2,18 @@ clear set -e -### set some variables -ERROR_MSG="" +### set color variables green=$(echo -en "\e[92m") yellow=$(echo -en "\e[93m") red=$(echo -en "\e[91m") cyan=$(echo -en "\e[96m") default=$(echo -en "\e[97m") +### sourcing all additional scripts +SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )" +for script in "${SRCDIR}/kiauh/scripts/"*.sh; do . $script; done +for script in "${SRCDIR}/kiauh/scripts/ui/"*.sh; do . $script; done + ### set important directories #klipper KLIPPER_DIR=${HOME}/klipper @@ -39,7 +43,7 @@ OCTOPRINT_CFG_DIR=${HOME}/.octoprint OCTOPRINT_SERVICE1=/etc/init.d/octoprint OCTOPRINT_SERVICE2=/etc/default/octoprint #misc -INI_FILE=${HOME}/kiauh/kiauh.ini +INI_FILE=${SRCDIR}/kiauh/kiauh.ini BACKUP_DIR=${HOME}/kiauh-backups ### set github repos @@ -49,7 +53,6 @@ DMBUTYUGIN_REPO=https://github.com/dmbutyugin/klipper.git DWC2FK_REPO=https://github.com/Stephan3/dwc2-for-klipper-socket.git MOONRAKER_REPO=https://github.com/Arksine/moonraker.git #branches -BRANCH_MOONRAKER=Arksine/dev-moonraker-testing BRANCH_SCURVE_SMOOTHING=dmbutyugin/scurve-smoothing BRANCH_SCURVE_SHAPING=dmbutyugin/scurve-shaping @@ -95,11 +98,6 @@ clear_msg(){ unset ERROR_MSG } -### sourcing all additional scripts -SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )" -for script in "${SRCDIR}/kiauh/scripts/"*.sh; do . $script; done -for script in "${SRCDIR}/kiauh/scripts/ui/"*.sh; do . $script; done - check_euid kiauh_status main_menu \ No newline at end of file diff --git a/scripts/functions.sh b/scripts/functions.sh index c1bf84c..4beee9f 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -28,7 +28,7 @@ locate_printer_cfg(){ } source_ini(){ - source ${HOME}/kiauh/kiauh.ini + source ${SRCDIR}/kiauh/kiauh.ini } start_klipper(){ diff --git a/scripts/switch_branch.sh b/scripts/switch_branch.sh index 6838f8b..05284ff 100755 --- a/scripts/switch_branch.sh +++ b/scripts/switch_branch.sh @@ -20,13 +20,4 @@ switch_to_scurve_smoothing(){ git remote add dmbutyugin $DMBUTYUGIN_REPO fi git fetch dmbutyugin -q && git checkout $BRANCH_SCURVE_SMOOTHING -q -} - -switch_to_moonraker(){ - cd $KLIPPER_DIR - status_msg "Switching...Please wait ..."; echo - if ! git remote | grep Arksine -q; then - git remote add Arksine $ARKSINE_REPO - fi - git fetch Arksine -q && git checkout $BRANCH_MOONRAKER -q } \ No newline at end of file