Skip to content
Snippets Groups Projects
Commit 16316e1d authored by Krisjanis Rijnieks's avatar Krisjanis Rijnieks :lion_face:
Browse files

Update inventory.sh to work with new inventory

parent 43d62f0d
No related branches found
No related tags found
No related merge requests found
Pipeline #381023 passed
......@@ -25,7 +25,7 @@ fi
LIBRARY_FILE=${1}
WHITELIST_FILE=${2}
INVENTORY_URL="http://inventory.fabcloud.io/data/inv.json"
INVENTORY_URL="https://inventory.fabcloud.io/inv.json"
SOURCE="Digi-Key"
# Whitelist. All the tools and materials from Digi-Key go here.
......@@ -56,7 +56,8 @@ done
# RT*M: https://stedolan.github.io/jq/manual/
# Play: https://jqplay.org/
echo "Loading fab inventory..."
ITEMS=$(curl -s ${INVENTORY_URL} | jq -r '.topics[] | .sources."Digi-Key".categories[]? | .[] | .item')
ITEMS=$(curl -s ${INVENTORY_URL} | jq -r '.items[] | select(.source | .[] | contains("Digi-Key")) | .item | .[]')
echo "Looking for matches in the library..."
for ITEM in ${ITEMS}; do
# TODO: Look for item in whitelist
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment