Skip to content

Commit

Permalink
Merge pull request #2730 from thomasjacquin/install.sh-fix-bug-#2-wit…
Browse files Browse the repository at this point in the history
…h-unlink-of-settings-files

install.sh: fix bug #2 with unlink of settings files
  • Loading branch information
EricClaeys authored Jun 1, 2023
2 parents 468fc77 + 0ce579d commit b8a5f6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ set_locale()
local L="$( settings .locale )"
MSG="Settings file '${SETTINGS_FILE}'"
if [[ ${L} == "" || ${L} == "null" ]]; then
# Probably a new install.
# Either a new install or an upgrade from an older Allsky.
MSG="${MSG} did NOT contain .locale so adding it."
display_msg --logonly info "${MSG}"
update_locale "${LOCALE}" "${SETTINGS_FILE}"
Expand Down Expand Up @@ -1291,7 +1291,8 @@ prompt_for_lat_long()
break
else
if VALUE="$( convertLatLong "${VALUE}" "${TYPE}" 2>&1 )" ; then
jq ".${TYPE}=\"${VALUE}\" " "${SETTINGS_FILE}" > /tmp/x && mv /tmp/x "${SETTINGS_FILE}"
# Have to use "cp" instead of "mv" to keep the hard link.
jq ".${TYPE}=\"${VALUE}\" " "${SETTINGS_FILE}" > /tmp/x && cp /tmp/x "${SETTINGS_FILE}" && rm /tmp/x
display_msg --log progress "${HUMAN_TYPE} set to ${VALUE}."
echo "${VALUE}"
break
Expand Down

0 comments on commit b8a5f6f

Please sign in to comment.