forked from freifunk-franken/firmware
buildscript: check selected_bsp link target
While buildscript checks whether selected_bsp exists, it does not verify whether it is pointing to a sensible direction. Since we use the target file name and content to derive build folders etc., though, this patch adds a check and exits the script if the link is broken. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
parent
5e37a2e9ba
commit
12422a5ea4
|
@ -360,7 +360,14 @@ clean() {
|
||||||
|
|
||||||
loadBSP()
|
loadBSP()
|
||||||
{
|
{
|
||||||
echo "Working with $(/bin/ls -l selected_bsp | awk '{ print $11 }')"
|
localbsppath=$(/bin/ls -l selected_bsp | awk '{ print $11 }')
|
||||||
|
|
||||||
|
if ! [ -s selected_bsp ]; then
|
||||||
|
echo "Error: $localbsppath does not exist. Aborting ..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Working with $localbsppath"
|
||||||
. selected_bsp
|
. selected_bsp
|
||||||
machine=$(basename $(realpath selected_bsp) .bsp)
|
machine=$(basename $(realpath selected_bsp) .bsp)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue