summaryrefslogtreecommitdiff
path: root/init/build-version
diff options
context:
space:
mode:
Diffstat (limited to 'init/build-version')
-rwxr-xr-xinit/build-version10
1 files changed, 10 insertions, 0 deletions
diff --git a/init/build-version b/init/build-version
new file mode 100755
index 000000000000..537d45815083
--- /dev/null
+++ b/init/build-version
@@ -0,0 +1,10 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-only
+
+prev_ver=$(cat .version 2>/dev/null) &&
+ver=$(expr ${prev_ver} + 1 2>/dev/null) ||
+ver=1
+
+echo ${ver} > .version
+
+echo ${ver}