summaryrefslogtreecommitdiff
path: root/fetch-sources.sh
diff options
context:
space:
mode:
authorAlexander Hill <ahill@breadpudding.dev>2025-04-12 19:43:46 -0400
committerAlexander Hill <ahill@breadpudding.dev>2025-04-12 19:43:46 -0400
commit2a1bf3ec1bc4d08b8dd4881fc30319ac33101b8f (patch)
tree03b1d6a10f2a3609aca36d03d45ca8fef5b689c8 /fetch-sources.sh
parent691cc97011b7fd4dab12e0274653e62b38879d62 (diff)
Renamed two scripts to follow the verb-noun.sh convention
Not really a convention yet, but it just makes sense to use.
Diffstat (limited to 'fetch-sources.sh')
-rwxr-xr-xfetch-sources.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/fetch-sources.sh b/fetch-sources.sh
new file mode 100755
index 0000000..6d700ea
--- /dev/null
+++ b/fetch-sources.sh
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+mkdir -p sources
+cd sources
+cat ../sources.list | while read line; do
+ HASH=$(echo $line | cut -d"," -f1)
+ URL=$(echo $line | cut -d"," -f2)
+ CANONICAL=$(echo $line | cut -d"," -f3)
+ if [ -z "$CANONICAL" ]; then
+ OUTPUT=$(basename $URL)
+ else
+ OUTPUT=$CANONICAL
+ fi
+ if [ ! -f "$OUTPUT" ]; then
+ echo $OUTPUT
+ curl -L $URL -o $OUTPUT
+ fi
+ echo "$HASH $OUTPUT" | sha256sum -c -
+done