2021-12-06 20:48:01 +00:00
|
|
|
#!/bin/bash -e
|
2021-03-05 14:38:48 +00:00
|
|
|
# Create copies of binaries with -latest, -$GIT_VERSION (OS#4413, OS#3452)
|
2021-03-08 07:33:47 +00:00
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
2021-03-05 14:38:48 +00:00
|
|
|
GIT_VERSION="$(./git-version-gen .tarball-version)"
|
|
|
|
|
|
|
|
echo "Copying binaries with "-latest" and "-$GIT_VERSION" appended..."
|
|
|
|
|
|
|
|
cd firmware/bin
|
|
|
|
for ext in bin elf; do
|
|
|
|
for file in *."$ext"; do
|
2022-11-15 00:03:44 +00:00
|
|
|
if ! [[ "$file" =~ ^(.*padded.*|.*nocrcstub.*bin)$ ]];then
|
2021-12-06 20:48:01 +00:00
|
|
|
without_ext="${file%.*}"
|
|
|
|
cp -v "$file" "$without_ext-latest.$ext"
|
|
|
|
cp -v "$file" "$without_ext-$GIT_VERSION.$ext"
|
|
|
|
fi
|
2021-03-05 14:38:48 +00:00
|
|
|
done
|
|
|
|
done
|