Skip to content

Commit

Permalink
Update installUpgradeFunctions.sh: Put "{" on separate line for funct…
Browse files Browse the repository at this point in the history
…ions

to be consistent with other files
  • Loading branch information
EricClaeys authored Nov 1, 2024
1 parent 1d843ad commit ca832bd
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions scripts/installUpgradeFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export LIGHTTPD_CONFIG_FILE="/etc/lighttpd/lighttpd.conf"

#####
# Display a header surrounded by stars.
function display_header() {
function display_header()
{
local HEADER="${1}"
local LEN
((LEN = ${#HEADER} + 8)) # 8 for leading and trailing "*** "
Expand All @@ -82,7 +83,8 @@ function calc_wt_size()
#####
# Get a Git version, stripping any trailing newline.
# Return "" if none, or on error.
function get_Git_version() {
function get_Git_version()
{
local BRANCH="${1}"
local PACKAGE="${2}"
local VF="$( basename "${ALLSKY_VERSION_FILE}" )"
Expand All @@ -99,7 +101,8 @@ function get_Git_version() {

#####
# Get the version from a local file, if it exists. If not, get from default file.
function get_version() {
function get_version()
{
local F="${1}"
if [[ -z ${F} ]]; then
F="${ALLSKY_VERSION_FILE}" # default
Expand All @@ -116,7 +119,8 @@ function get_version() {

#####
# Get the branch using git.
function get_branch() {
function get_branch()
{
local H="${1:-${ALLSKY_HOME}}"
echo "$( cd "${H}" || exit; git rev-parse --abbrev-ref HEAD )"
}
Expand All @@ -125,7 +129,8 @@ function get_branch() {
#####
# Get a shell variable's value. The variable can have optional spaces and tabs before it.
# This function is useful when we can't "source" the file.
function get_variable() {
function get_variable()
{
local VARIABLE="${1}"
local FILE="${2}"
local LINE=""
Expand Down Expand Up @@ -1054,7 +1059,8 @@ function get_computer()
# files directly. This does assume that both the cli and cgi settings files
# work in the same way.
#
function get_php_setting() {
function get_php_setting()
{
local SETTING="${1}"
php -r "echo ini_get('${SETTING}');"
}
Expand Down

0 comments on commit ca832bd

Please sign in to comment.