mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
Clean up setup_dirs
This commit is contained in:
1 parent
f82df9eacf
commit
d34293e2c8
1 file changed
+11
-4
@@ -84,13 +84,20 @@ logger(){
|
|||||||
printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \
|
printf "%s␞%s␞%s::%s()::%s␞%s\n" "$date" "$tag" "$self" "$caller" "$line" "$string" \
|
||||||
| redact >> "$debug_log"
|
| redact >> "$debug_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_dirs(){
|
setup_dirs(){
|
||||||
for dir in "$state_path" "$cache_path" "$share_path" "$helpers_path" "$freedesktop_path" "$config_path" "$log_path"; do
|
directories="$state_path "
|
||||||
if [[ ! -d $dir ]]; then
|
directories+="$cache_path "
|
||||||
mkdir -p "$dir"
|
directories+="$share_path "
|
||||||
fi
|
directories+="$helpers_path "
|
||||||
|
directories+="$freedesktop_path "
|
||||||
|
directories+="$config_path "
|
||||||
|
directories+="$log_path "
|
||||||
|
for dir in $directories; do
|
||||||
|
mkdir -p "$dir"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_state_files(){
|
setup_state_files(){
|
||||||
if [[ -f "$debug_log" ]]; then
|
if [[ -f "$debug_log" ]]; then
|
||||||
rm "$debug_log" && touch $debug_log
|
rm "$debug_log" && touch $debug_log
|
||||||
|
|||||||
Reference in new issue
Block a user