Compare commits

...

4 Commits

Author SHA1 Message Date
Koloszár Gergely
c283e741da
Merge ec7daf7f6b into 23fb10f48e 2025-10-23 04:58:58 +00:00
aclist
ec7daf7f6b fix: store filepaths in array
I opted to encapsulate these in an array because I was paranoid about
needing to separate each directory with a whitespace when storing them
on a stringwise basis. This should be safer and ensure the paths don't
get concatenated together if the whitespace is omitted.
2025-10-23 13:57:19 +09:00
aclist
d0de2974d8 fix: emit heredoc directly 2025-10-23 13:44:50 +09:00
aclist
5a54d43601 fix: encapsulate usage command 2025-10-23 13:38:56 +09:00

View File

@ -86,14 +86,15 @@ logger(){
} }
setup_dirs(){ setup_dirs(){
directories="$state_path " directories=()
directories+="$cache_path " directories+=("$state_path")
directories+="$share_path " directories+=("$cache_path")
directories+="$helpers_path " directories+=("$share_path")
directories+="$freedesktop_path " directories+=("$helpers_path")
directories+="$config_path " directories+=("$freedesktop_path")
directories+="$log_path " directories+=("$config_path")
for dir in $directories; do directories+=("$log_path")
for dir in "${directories[@]}"; do
mkdir -p "$dir" mkdir -p "$dir"
done done
} }
@ -1093,7 +1094,8 @@ uninstall(){
echo "Uninstall routine complete" echo "Uninstall routine complete"
} }
read -r -d '' helptext <<- EOM usage(){
cat <<- EOM
DZGUI - Free and Open Source DayZ launcher DZGUI - Free and Open Source DayZ launcher
Usage: Usage:
@ -1115,6 +1117,7 @@ Options:
-h, --help: -h, --help:
Prints this message Prints this message
EOM EOM
}
main(){ main(){
# setup zenity environment # setup zenity environment
@ -1136,7 +1139,7 @@ main(){
# shift # shift
;; ;;
"--help" | "-h") "--help" | "-h")
echo "$helptext" usage
exit 0 exit 0
# shift # shift
;; ;;