+ # Defaults
+ dir_data="$HOME/.khatus"
+ weather_station_id='KJFK'
+
+ # User-overrides
+ OPTS=$(
+ getopt \
+ -o '' \
+ -l data-dir:,weather-station: \
+ -- "$@"
+ )
+ eval set -- "$OPTS"
+ while true
+ do
+ case "$1" in
+ --data-dir)
+ dir_data="$2"
+ shift 2
+ ;;
+ --weather-station)
+ weather_station_id="$2"
+ shift 2
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+ done
+
+ ( echo "Khatus starting with the following parameters:"
+ ( echo " dir_data|= $dir_data"
+ echo " weather_station_id|= $weather_station_id"
+ ) | column -ts\|
+ echo ''
+ ) >&2
+
+ pipe="$dir_data/khatus_data_pipe"
+
+ mkdir -p "$dir_data"