Skip to content

Commit

Permalink
Update updater.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmerrell committed May 10, 2022
1 parent 9ed9068 commit 08cc8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ if [ "$current_version" != "$latest_version" ]; then
cd /opt/Stem/branch_staging/"$latest_version_underscored" || exit

# Run the installer.
if [ "$(./install.sh)" -ne 0 ]; then
if [ "$(sudo ./install.sh)" -ne 0 ]; then
echo "Installer failed."
else
echo "Branch updated to version ${latest_version}."
tmp=$(mktemp)
jq '.current_version = "$latest_version"' "${branch_dir}${config_file}" > "$tmp" && mv "$tmp" "${branch_dir}${config_file}"
jq --arg version "${latest_version}" '.current_version = $version' "${branch_dir}${config_file}" > "$tmp" && mv "$tmp" "${branch_dir}${config_file}"
fi

else
Expand Down

0 comments on commit 08cc8ba

Please sign in to comment.