From 1e1031e2f223f6af31e8e522418fadb3151d9b9c Mon Sep 17 00:00:00 2001 From: Zoey Date: Sat, 11 Nov 2023 16:01:01 +0100 Subject: [PATCH] fix shellcheck Signed-off-by: Zoey --- update.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/update.sh b/update.sh index 8eba007..5f0acf2 100755 --- a/update.sh +++ b/update.sh @@ -64,32 +64,35 @@ fi while true; do -export message="\ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID" -A $CUA -H "x-api-key: $AAK" | jq -r .itinerary[].name) \ +message="\ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID" -A $CUA -H "x-api-key: $AAK" | jq -r .itinerary[].name)" \ ab \ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID" -A $CUA -H "x-api-key: $AAK" | jq -r .startDate) \n\ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID" -A $CUA -H "x-api-key: $AAK" | jq -r .startDate)" \n\ " +export message for ACID in $(echo "$ACIDs" | tr " " "\n"); do -export message="\ +message="\ $message\ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIO%2CPREMIUM" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACID"'") | .priceModel') \ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIO%2CPREMIUM" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACID"'") | .head'): \ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIO%2CPREMIUM" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACID"'") | .price')€ \n\ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIO%2CPREMIUM" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACID"'") | .priceModel')" \ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIO%2CPREMIUM" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACID"'") | .head')": \ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIO%2CPREMIUM" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACID"'") | .price')"€ \n\ " +export message done for ACAIID in $(echo "$ACAIIDs" | tr " " "\n"); do -export message="\ +message="\ $message\ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIOAI%2CPREMIUMAI" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACAIID"'") | .priceModel') \ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIOAI%2CPREMIUMAI" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACAIID"'") | .head'): \ -$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIOAI%2CPREMIUMAI" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACAIID"'") | .price')€ \n\ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIOAI%2CPREMIUMAI" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACAIID"'") | .priceModel')" \ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIOAI%2CPREMIUMAI" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACAIID"'") | .head')": \ +"$(curl -s "https://iris.cruise-api.aida.de/cruises/$AID?adults=$AA&juveniles=$AJ&children=$AC&priceModels=VARIOAI%2CPREMIUMAI" -A $CUA -H "x-api-key: $AAK" | jq -r '.cabinCategories[] | select(.id == "'"$ACAIID"'") | .price')"€ \n\ " +export message done