summaryrefslogtreecommitdiff
path: root/sh/dnd
AgeCommit message (Expand)Author
2025-08-02fix: dnd logicXiao Pan
2025-02-23Run `true` and `false` cli is slowXiao Pan
2025-02-23less codeXiao Pan
2025-02-22Consider no systemd-resolvedXiao Pan
2024-04-14dnd add one more my commonly used domainXiao Pan
2024-04-12add more domain for dndXiao Pan
2024-03-12feat: add dnd for DNS testingXiao Pan
d='n2' href='#n2'>2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/sh
# DATE From To

while getopts cfF:t:T: opt; do
	case $opt in
		c) tz_from="Asia/Shanghai";;
		f) tz_from="$(tzselect)";;
		F) tz_from="$OPTARG";;
		# one extra ',' at the end will not let `for tz in ...` loop one extra time?
		t)	for i in $(seq "$OPTARG"); do
				tz_to="$(tzselect),$tz_to"
			done;;
		T) tz_to="$OPTARG,$tz_to";;
		\?) exit 1;;
	esac
done
shift $((OPTIND-1))