2022-09-26 11:12:41 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-09-26 11:31:29 +02:00
|
|
|
cmake --build . -j
|
|
|
|
source create-version-file.sh
|
|
|
|
|
|
|
|
if [ ! -f eive-obsw-stripped ]; then
|
2022-09-26 11:12:41 +02:00
|
|
|
echo "No file eive-obsw-stripped found. Please ensure you are in the "
|
|
|
|
echo "build folder and the OBSW was built properly"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-09-26 11:31:29 +02:00
|
|
|
if [ ! -f obsw_version.txt ]; then
|
2022-09-26 11:12:41 +02:00
|
|
|
echo "No OBSW version file found."
|
|
|
|
echo "You can use the create-version-file.sh script to create it"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-09-26 18:40:31 +02:00
|
|
|
mkdir update-archive
|
|
|
|
cp eive-obsw-stripped update-archive
|
|
|
|
cp obsw_version.txt update-archive
|
|
|
|
|
|
|
|
cd update-archive
|
|
|
|
|
|
|
|
sudo chown root:root eive-obsw-stripped
|
|
|
|
sudo chown root:root obsw_version.txt
|
|
|
|
|
2022-09-26 11:31:29 +02:00
|
|
|
cmd="tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt"
|
|
|
|
echo "Running command ${cmd} to generate compressed SW update archive."
|
2022-09-26 11:12:41 +02:00
|
|
|
eval ${cmd}
|
2022-09-26 18:40:31 +02:00
|
|
|
cp eive-sw-update.tar.xz ..
|
|
|
|
cd ..
|
|
|
|
rm -rf update-archive
|
|
|
|
|
2022-09-26 11:31:29 +02:00
|
|
|
echo "Generated eive-sw-update.tar.xz update archive."
|