mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
ae4c4cee81
At first, I thought this script would be needed only in init/Makefile. However, commit5db8face97
("kbuild: Restore .version auto-increment behaviour for Debian packages") and commit1789fc9125
("kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg") revealed that it was actually needed for scripts/package/mk* as well. After all, scripts/ is a better place for it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
11 lines
177 B
Bash
Executable File
11 lines
177 B
Bash
Executable File
#!/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}
|