mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
Clean up setup_dirs
This commit is contained in:
parent
f82df9eacf
commit
d34293e2c8
15
dzgui.sh
15
dzgui.sh
@ -84,13 +84,20 @@ logger(){
|
||||
printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \
|
||||
| redact >> "$debug_log"
|
||||
}
|
||||
|
||||
setup_dirs(){
|
||||
for dir in "$state_path" "$cache_path" "$share_path" "$helpers_path" "$freedesktop_path" "$config_path" "$log_path"; do
|
||||
if [[ ! -d $dir ]]; then
|
||||
mkdir -p "$dir"
|
||||
fi
|
||||
directories="$state_path "
|
||||
directories+="$cache_path "
|
||||
directories+="$share_path "
|
||||
directories+="$helpers_path "
|
||||
directories+="$freedesktop_path "
|
||||
directories+="$config_path "
|
||||
directories+="$log_path "
|
||||
for dir in $directories; do
|
||||
mkdir -p "$dir"
|
||||
done
|
||||
}
|
||||
|
||||
setup_state_files(){
|
||||
if [[ -f "$debug_log" ]]; then
|
||||
rm "$debug_log" && touch $debug_log
|
||||
|
||||
Loading…
Reference in New Issue
Block a user