Skip to content

Commit

Permalink
add tweaks new line
Browse files Browse the repository at this point in the history
  • Loading branch information
murkl committed Nov 3, 2024
1 parent 16c7cbf commit 6846273
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions d2launcher
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ show_tweaks_menu() {
# Download tweaks db from URL (if not exists)
[ ! -f "$SCRIPT_TWEAKS_FILE" ] && ! show_gui_update_tweaks_db && return 1

# Check syntax
if ! [[ "$(sed '/^[[:space:]]*$/d' "${SCRIPT_TWEAKS_FILE}" | head -n 1 | awk '{print $1}')" == "###!"* ]]; then
zenity_error "No correct syntax format"
exit 1
fi

# 2.
# Clear and recreate temporary directory for tweaks
rm -rf "${SCRIPT_TEMP_DIR}/tweaks"
mkdir -p "${SCRIPT_TEMP_DIR}/tweaks"
Expand All @@ -420,7 +420,8 @@ show_tweaks_menu() {
declare -a name_version_list

# Parse tweaks file and save in list (line by line)
while IFS= read -r line; do
# Add empty line at the end
echo >>"$SCRIPT_TWEAKS_FILE" && while IFS= read -r line; do
if [[ $line == "###!> name:"* ]]; then
# Process previous entry if complete
if [[ -n $name && -n $version && -n $content ]]; then
Expand Down

0 comments on commit 6846273

Please sign in to comment.