mirror of
https://linux.maple.camp/git/ahill/maplelinux-bootstrap.git
synced 2026-02-11 10:13:35 +00:00
Renamed two scripts to follow the verb-noun.sh convention
Not really a convention yet, but it just makes sense to use.
This commit is contained in:
18
fetch-sources.sh
Executable file
18
fetch-sources.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user