Skip to content
Snippets Groups Projects
Unverified Commit 0bcc9045 authored by Frédéric Pierret (fepitre)'s avatar Frédéric Pierret (fepitre)
Browse files

update-sources: clean version modification in case of failure

(cherry picked from commit fadb4b64)
parent 21828df5
No related merge requests found
......@@ -6,6 +6,14 @@ set -o pipefail
[ "$DEBUG" = "1" ] && set -x
exit_clean() {
local exit_code=$?
if [ $exit_code -gt 0 ]; then
git checkout -- version
fi
exit "${exit_code}"
}
distance_version() {
read -ra VER1 <<<"$(echo "$1" | tr '.' ' ')"
read -ra VER2 <<<"$(echo "$2" | tr '.' ' ')"
......@@ -42,6 +50,8 @@ if [ "x$LATEST_KERNEL_VERSION" == "x" ]; then
fi
# Download latest kernel
trap 'exit_clean' 0 1 2 3 6 15
echo "$LATEST_KERNEL_VERSION" > version
make get-sources
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment