sdk_lib/sdk_entry: handle permission error for target version file

The creation of the target version file failed:
/home/sdk/sdk_entry.sh: line 32: /build/amd64-usr/etc/target-version.txt: Permission denied
Use root permissions to create the file.
This commit is contained in:
Kai Lueke 2022-01-06 17:03:39 +01:00
parent 5c170c54c3
commit 38729ac1dc

View File

@ -29,7 +29,7 @@ chown -R sdk:sdk /home/sdk
echo "Updating board support in '/build/${target}' to use package cache for version '${FLATCAR_VERSION_ID}'"
echo "---"
sudo su sdk -l -c "/home/sdk/trunk/src/scripts/setup_board --board='$target' --regen_configs_only"
echo "TARGET_FLATCAR_VERSION_ID='${FLATCAR_VERSION_ID}'" > "/build/$target/etc/target-version.txt"
echo "TARGET_FLATCAR_VERSION_ID='${FLATCAR_VERSION_ID}'" | sudo tee "/build/$target/etc/target-version.txt" >/dev/null
done
fi
)