Merge claude/1
This commit is contained in:
commit
a27be53eaf
28
init.sh
28
init.sh
@ -465,20 +465,13 @@ initCheckConfigs() {
|
|||||||
# Check if any config files exist (new structure) or old config files
|
# Check if any config files exist (new structure) or old config files
|
||||||
local config_found=false
|
local config_found=false
|
||||||
|
|
||||||
# Check for new structure
|
# Check for new structure. Skip subdirectories (per-location nested backup
|
||||||
|
# configs are loaded by their own helper) and the .category markers.
|
||||||
if [ -d "$configs_dir" ]; then
|
if [ -d "$configs_dir" ]; then
|
||||||
for category_dir in "$configs_dir"/*; do
|
for category_dir in "$configs_dir"/*; do
|
||||||
if [ -d "$category_dir" ] && [ -f "$category_dir/.category" ]; then
|
if [ -d "$category_dir" ] && [ -f "$category_dir/.category" ]; then
|
||||||
# Load new structure config files
|
|
||||||
for config_file in "$category_dir"/*; do
|
for config_file in "$category_dir"/*; do
|
||||||
local should_load=true
|
if [ -f "$config_file" ] && [[ ! "$config_file" =~ \.category$ ]]; then
|
||||||
local filename=$(basename "$config_file")
|
|
||||||
# Skip .category files and excluded files (hardcoded)
|
|
||||||
if [[ "$config_file" =~ \.category$ ]]; then
|
|
||||||
should_load=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$should_load" = true ]; then
|
|
||||||
source "$config_file"
|
source "$config_file"
|
||||||
config_found=true
|
config_found=true
|
||||||
fi
|
fi
|
||||||
@ -1225,18 +1218,15 @@ reset_git_config() {
|
|||||||
|
|
||||||
# Helper function to load config files in the libreportal command
|
# Helper function to load config files in the libreportal command
|
||||||
commandReloadConfigs() {
|
commandReloadConfigs() {
|
||||||
# Load new structure config files only
|
# Load new structure config files only. Skip subdirectories (e.g. the
|
||||||
|
# per-location nested backup configs/backup/locations/<idx>/) — those are
|
||||||
|
# loaded by their own sourceBackupLocations helper. Skip the .category
|
||||||
|
# marker files too. Matches the guard initReloadConfigs / commandUpdateConfigOption
|
||||||
|
# already use.
|
||||||
for category_dir in "$configs_dir"/*; do
|
for category_dir in "$configs_dir"/*; do
|
||||||
if [ -d "$category_dir" ] && [ -f "$category_dir/.category" ]; then
|
if [ -d "$category_dir" ] && [ -f "$category_dir/.category" ]; then
|
||||||
for config_file in "$category_dir"/*; do
|
for config_file in "$category_dir"/*; do
|
||||||
local should_load=true
|
if [ -f "$config_file" ] && [[ ! "$config_file" =~ \.category$ ]]; then
|
||||||
local filename=$(basename "$config_file")
|
|
||||||
# Skip .category files and excluded files (hardcoded for now)
|
|
||||||
if [[ "$config_file" =~ \.category$ ]]; then
|
|
||||||
should_load=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$should_load" = true ]; then
|
|
||||||
source "$config_file"
|
source "$config_file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user