Skip to content

Commit

Permalink
fix more things macOS doesn't support because its bash version is anc…
Browse files Browse the repository at this point in the history
…ient
  • Loading branch information
lunarcloud committed Jun 11, 2024
1 parent 6c144ad commit 82a1430
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions script-dialog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ else
fi

# Handle when read command doesn't support default text option
if read -i "test" <<< echo "test" >/dev/null; then
if echo "test" | read -i "test" 2>/dev/null; then
NO_READ_DEFAULT=""
fi

Expand Down Expand Up @@ -1230,10 +1230,13 @@ function datepicker() {
fi
_calculate-gui-title

NOW=$( printf '%(%d/%m/%Y)T' )
DAY=$( printf '%(%d)T' )
MONTH=$( printf '%(%m)T' )
YEAR=$( printf '%(%Yd)T' )
NOW="31/12/2024"
if [ ! -z ${NO_READ_DEFAULT+x} ]; then
NOW=$( printf '%(%d/%m/%Y)T' )
fi
DAY=0
MONTH=0
YEAR=0

if [ "$INTERFACE" == "whiptail" ]; then
local SYMBOL=$CALENDAR_SYMBOL
Expand Down

0 comments on commit 82a1430

Please sign in to comment.