Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh: fix bug #2 with unlink of settings files #2730

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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