download/coreboot: simplify small if statements
parent
d28584f3d0
commit
86512e84be
|
@ -84,26 +84,21 @@ download_coreboot_for_board()
|
||||||
if [ -d "coreboot/${cbtree}" ]; then
|
if [ -d "coreboot/${cbtree}" ]; then
|
||||||
printf "REMARK: download/coreboot %s: exists. Skipping.\n" \
|
printf "REMARK: download/coreboot %s: exists. Skipping.\n" \
|
||||||
${cbtree}
|
${cbtree}
|
||||||
if [ "${cbtree}" != "${1}" ]; then
|
[ "${cbtree}" != "${1}" ] && \
|
||||||
printf "(for board: '${1}')\n"
|
printf "(for board: '%s}')\n" ${1}
|
||||||
fi
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d coreboot ]; then
|
[ ! -d coreboot ] && \
|
||||||
mkdir "coreboot/"
|
mkdir "coreboot/"
|
||||||
fi
|
[ ! -d coreboot ] && \
|
||||||
if [ ! -d coreboot ]; then
|
printf "ERROR: download/coreboot: directory not created\n" && \
|
||||||
printf "ERROR: download/coreboot: directory not created."
|
|
||||||
printf " Check file system permissions\n"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
|
||||||
|
|
||||||
cd "coreboot/"
|
cd "coreboot/"
|
||||||
|
|
||||||
if [ ! -d coreboot/.git ] && [ -d coreboot ]; then
|
[ ! -d coreboot/.git ] && [ -d coreboot ] && \
|
||||||
rm -Rf coreboot/
|
rm -Rf coreboot/
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d coreboot ]; then
|
if [ ! -d coreboot ]; then
|
||||||
printf "Download coreboot from upstream:\n"
|
printf "Download coreboot from upstream:\n"
|
||||||
|
|
Loading…
Reference in New Issue