Rework on scripts
Also we are now using a cross compiler to create the toolchain because I'm too lazy to do too much scripting lmao.
This commit is contained in:
parent
a9a3077633
commit
b041f9304f
8 changed files with 45 additions and 43 deletions
|
|
@ -1,15 +1,15 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
source ./scripts/config.sh
|
||||
. $PWD/scripts/config.sh
|
||||
|
||||
while IFS= read -r url; do \
|
||||
[ -z "$url" ] && continue; \
|
||||
fname="$(printf '%s' "$url" | sed -E 's/[?#].*$//' | sed -E 's!.*/!!')"; \
|
||||
if [ -e "./sources/$fname" ]; then \
|
||||
if [ -e "$PROOT/sources/$fname" ]; then \
|
||||
printf "SKIP: %s (already exists)\n" "$fname"; \
|
||||
else \
|
||||
printf "GET: %s -> %s\n" "$url" "$fname"; \
|
||||
curl -f -L -O -S --output-dir "./sources/" "$url" || { printf "ERROR: failed to download %s\n" "$url"; exit 1; }; \
|
||||
curl -f -L -O -S --output-dir "$PROOT/sources/" "$url" || { printf "ERROR: failed to download %s\n" "$url"; exit 1; }; \
|
||||
fi; \
|
||||
done < "$SOURCES_FILE"; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue