mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 00:28:52 +02:00 
			
		
		
		
	 ae4c4cee81
			
		
	
	
		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>
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			177 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			10 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}
 |