Procházet zdrojové kódy

Double quotes are unsuitable when performing word splitting

poesty před 1 rokem
rodič
revize
4240102bb8
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      update/update_fbadb_1.sh
  2. 1 1
      update/update_fbadb_2.sh

+ 1 - 1
update/update_fbadb_1.sh

@@ -24,7 +24,7 @@ while true; do
         # Parse the feed and get the link of the first entry
         urls=$(echo "$feed" | xmlstarlet sel -N atom=http://www.w3.org/2005/Atom -t -v "//atom:entry/atom:link/@href" | head -n "$update_count" | awk -F'/' '{print $NF}' | sort | uniq -c | sort -nr | awk '{print $2}')
 
-        for url in "$urls"; do
+        for url in $urls; do
                 cd /opt/fedi-block-api && sudo -Hu fba python3 fetch_instances.py "$url"
         done
 

+ 1 - 1
update/update_fbadb_2.sh

@@ -24,7 +24,7 @@ while true; do
         # Parse the feed and get the link of the entries
         urls=$(echo "$feed" | xmlstarlet sel -t -v "/rss/channel/item/title" | head -n "$update_count" | awk '{print $NF}' | sort | uniq -c | sort -nr | awk '{print $2}')
 
-        for url in "$urls"; do
+        for url in $urls; do
                 cd /opt/fedi-block-api && sudo -Hu fba python3 fetch_instances.py "$url"
         done