Page MenuHomeFreeBSD

bsdinstall/time: Replace dialog with bsddialog
ClosedPublic

Authored by asiciliano on Mar 17 2022, 1:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 10:50 AM
Unknown Object (File)
Sat, Apr 27, 10:50 AM
Unknown Object (File)
Sat, Apr 27, 10:50 AM
Unknown Object (File)
Sat, Apr 27, 9:51 AM
Unknown Object (File)
Wed, Apr 24, 8:27 PM
Unknown Object (File)
Mon, Apr 22, 6:44 AM
Unknown Object (File)
Fri, Apr 19, 2:33 PM
Unknown Object (File)
Fri, Apr 19, 2:33 PM
Subscribers

Details

Summary

Replace (LGPL) dialog with (BSD-2-Clause) bsddialog: 'dialog --calendar' is replaced by 'bsddialog --datebox' with same features but different User Interface.

Test Plan

% bsddialog --timebox test 0 0
% bsddialog --datebox test 0 0

or timetest.sh:

#!/bin/sh

# Set date
exec 3>&1
DATE=$(bsddialog --backtitle 'FreeBSD Installer' \
	--title ' Date ' \
	--ok-label 'Set Date' \
	--cancel-label 'Skip' \
	--default-no \
	--date-format '%Y%m%d%H%M.%S' \
	--datebox '' 0 40 \
2>&1 1>&3)
exec 3>&-

echo $DATE



# Set time
exec 3>&1
TIME=$(bsddialog --backtitle 'FreeBSD Installer' \
	--title ' Time ' \
	--ok-label 'Set Time' \
	--cancel-label 'Skip' \
	--default-no \
	--time-format '%H%M.%S' \
	--timebox '' 0 40 \
2>&1 1>&3)
exec 3>&-

echo $TIME

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable