Skip to content

Commit

Permalink
minor reshuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
OneCDOnly committed Feb 8, 2024
1 parent 28d808e commit cfaca66
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions support/sherpa-manager.source
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Init()
Lists:Load
Paths:Create || return
ArchivePriorSessLogs
TerminalDimensions:Load
Debug.Log:Init

if [[ $load_objects = true ]]; then
Expand Down Expand Up @@ -563,6 +562,15 @@ Env:Load()

rm -f "$REPORT_OUTPUT_PATHFILE" "$RAMDISKS_FREESPACE_PATHFILE" "$DISPLAY_INHIBIT_PATHFILE"

if [[ -e $GNU_STTY_CMD && -t 0 ]]; then
local terminal_dimensions=$($GNU_STTY_CMD size)
readonly SESS_ROWS=${terminal_dimensions% *}
readonly SESS_COLS=${terminal_dimensions#* }
else
readonly SESS_ROWS=40
readonly SESS_COLS=156
fi

}

Lists:Load()
Expand Down Expand Up @@ -3126,22 +3134,6 @@ User.IsSU()

}

TerminalDimensions:Load()
{

if [[ -e $GNU_STTY_CMD && -t 0 ]]; then
local terminal_dimensions=$($GNU_STTY_CMD size)
readonly SESS_ROWS=${terminal_dimensions% *}
readonly SESS_COLS=${terminal_dimensions#* }
else
readonly SESS_ROWS=40
readonly SESS_COLS=156
fi

return 0

}

DebugBinPathVerAndMinVer()
{

Expand Down Expand Up @@ -10835,7 +10827,7 @@ sleep()
if [[ -e $GNU_SLEEP_CMD && -L /opt/etc/passwd ]]; then # Try to ensure Entware is active before using this utility.
$GNU_SLEEP_CMD "$n"
elif [[ $DECIMAL_SLEEP_SECONDS_SUPPORTED = false ]]; then
$SLEEP_CMD "$((${n%.*}+1))" # Ensure decimal seconds are rounded-up to next integer.
$SLEEP_CMD "$((${n%.*}+1))" # Ensure decimal seconds are rounded-up to next integer.
else
$SLEEP_CMD "$n"
fi
Expand Down

0 comments on commit cfaca66

Please sign in to comment.