From 440269224344c344a30111c90bd9c2db6605bd3b Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 16 Mar 2025 18:35:39 +0200 Subject: Changed way of settings initiation --- config.sh | 1 - install.sh | 1 - lib/_ak_settings | 9 +++++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config.sh b/config.sh index 6833dd1..4ecd6e3 100755 --- a/config.sh +++ b/config.sh @@ -1,7 +1,6 @@ export AK_ROOT=$HOME export AK_WORKDIR="$AK_ROOT/.arching-kaos" export AK_CONFIGDIR="$AK_WORKDIR/config" -export AK_SETTINGS="$AK_WORKDIR/settings" export AK_BINDIR="$AK_WORKDIR/bin" export AK_LIBDIR="$AK_WORKDIR/lib" export PATH=$PATH:$AK_BINDIR diff --git a/install.sh b/install.sh index ec881cb..1fb2593 100755 --- a/install.sh +++ b/install.sh @@ -72,7 +72,6 @@ _ak_countdown_seconds 5 _ak_check_and_create_dir $AK_CONFIGDIR _ak_check_and_create_dir $AK_BINDIR -_ak_check_and_create_dir $AK_SETTINGS _ak_check_and_create_dir $AK_LIBDIR _ak_check_and_create_dir $AK_MODULESDIR _ak_check_and_create_dir $AK_ZBLOCKDIR diff --git a/lib/_ak_settings b/lib/_ak_settings index 5b6b0bb..be01bc9 100755 --- a/lib/_ak_settings +++ b/lib/_ak_settings @@ -20,6 +20,15 @@ source $AK_LIBDIR/_ak_script +if [ ! -d "${AK_WORKDIR}" ] +then + _ak_log_error "No workdir" + exit 4 +fi + +export AK_SETTINGS="$AK_WORKDIR/settings" +_ak_check_and_create_dir $AK_SETTINGS + function _ak_settings_get(){ if [ ! -z "$1" ] && [ -n "$1" ] then -- cgit v1.2.3