summaryrefslogtreecommitdiff
path: root/sh/mvtu
AgeCommit message (Expand)Author
2024-02-23Reorganize shell scripts into sh dir, consider in the future fsh will have di...Xiao Pan
n19' href='#n19'>19 20 21 22 23 24 25 26 27 28 29
#!/bin/sh
# DATE From To

while getopts fF: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))