download/coreboot: simplified for loops
parent
b24fbc74c3
commit
fd8b8084ee
|
@ -46,26 +46,20 @@ main()
|
||||||
|
|
||||||
printf "Downloading coreboot and (if available) applying patches\n"
|
printf "Downloading coreboot and (if available) applying patches\n"
|
||||||
|
|
||||||
|
boards=""
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
for board in "${@}"; do
|
boards=$@
|
||||||
rm -f resources/coreboot/*/seen
|
|
||||||
downloadfor "${board}"
|
|
||||||
if [ -f build_error ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
for board in resources/coreboot/*; do
|
for board in resources/coreboot/*; do
|
||||||
rm -f resources/coreboot/*/seen
|
[ ! -d "${board}" ] && continue
|
||||||
if [ ! -d "${board}/" ]; then
|
boards="${boards} ${board}"
|
||||||
continue
|
|
||||||
fi
|
|
||||||
downloadfor "${board##*/}"
|
|
||||||
if [ -f build_error ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
for board in ${boards}; do
|
||||||
|
rm -f resources/coreboot/*/seen
|
||||||
|
downloadfor "${board}"
|
||||||
|
[ -f build_error ] && break
|
||||||
|
done
|
||||||
|
|
||||||
rm -f resources/coreboot/*/seen
|
rm -f resources/coreboot/*/seen
|
||||||
|
|
||||||
|
@ -234,9 +228,7 @@ downloadfor() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for patch in ../../resources/coreboot/${cbtree}/patches/*.patch; do
|
for patch in ../../resources/coreboot/${cbtree}/patches/*.patch; do
|
||||||
if [ ! -f "${patch}" ]; then
|
[ ! -f "${patch}" ] && continue
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
git am "${patch}" || touch ../../build_error
|
git am "${patch}" || touch ../../build_error
|
||||||
if [ -f ../../build_error ]; then
|
if [ -f ../../build_error ]; then
|
||||||
|
|
Loading…
Reference in New Issue