fixed alias
This commit is contained in:
parent
d99abaed6a
commit
d60276e403
6
bb
6
bb
@ -40,7 +40,7 @@ fi
|
||||
|
||||
# creating station alias list on fresh installs
|
||||
if [[ ! -e "$ALIAS_FILE" ]] ; then
|
||||
starter_json=$(printf '{ "stations": [] }' | gojq '.')
|
||||
starter_json=$(printf '{}' | gojq '.')
|
||||
echo "$starter_json" > "$ALIAS_FILE"
|
||||
fi
|
||||
|
||||
@ -166,9 +166,9 @@ print_status() {
|
||||
# prints
|
||||
get_station_info # sets $DOCKS $BIKES and $STATIONID
|
||||
|
||||
if [[ -e "$WORKINGDIR/aliases.json" ]] ; then
|
||||
if [[ -e "$ALIAS_FILE" ]] ; then
|
||||
FMT_STATIONID=$(printf '"%d"' $STATIONID)
|
||||
ALIAS=$(cat "$WORKINGDIR/aliases.json" | gojq ".$FMT_STATIONID" | tr -d '"')
|
||||
ALIAS=$(cat "$ALIAS_FILE" | gojq ".$FMT_STATIONID" | tr -d '"')
|
||||
if [[ ! -z "$ALIAS" ]] ; then
|
||||
STATION_NAME="$ALIAS"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user