Page MenuHomeFreeBSD

bsdinstall/time: Replace dialog with bsddialog
ClosedPublic

Authored by asiciliano on Mar 17 2022, 1:28 AM.
Tags
None
Referenced Files
F115929022: D34583.diff
Wed, Apr 30, 1:10 PM
Unknown Object (File)
Sun, Apr 20, 12:49 AM
Unknown Object (File)
Tue, Apr 15, 2:48 PM
Unknown Object (File)
Mon, Apr 14, 9:05 AM
Unknown Object (File)
Mon, Apr 14, 4:56 AM
Unknown Object (File)
Mon, Apr 14, 1:27 AM
Unknown Object (File)
Sun, Apr 13, 10:57 PM
Unknown Object (File)
Tue, Apr 1, 3:53 AM
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