setlocalversion (7d153696e5db1e37387c2f7ec06ffc8d4aac70a4) | setlocalversion (129ab0d2d9f38b9d43df35235fc66c6740d6928b) |
---|---|
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# 4# This scripts adds local version information from the version 5# control systems git, mercurial (hg) and subversion (svn). 6# 7# If something goes wrong, send a mail the kernel build mailinglist 8# (see MAINTAINERS) and CC Nico Schottelius --- 109 unchanged lines hidden (view full) --- 118 119# localversion* files in the build and source directory 120res="$(collect_files localversion*)" 121if test ! "$srctree" -ef .; then 122 res="$res$(collect_files "$srctree"/localversion*)" 123fi 124 125# CONFIG_LOCALVERSION and LOCALVERSION (if set) | 1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# 4# This scripts adds local version information from the version 5# control systems git, mercurial (hg) and subversion (svn). 6# 7# If something goes wrong, send a mail the kernel build mailinglist 8# (see MAINTAINERS) and CC Nico Schottelius --- 109 unchanged lines hidden (view full) --- 118 119# localversion* files in the build and source directory 120res="$(collect_files localversion*)" 121if test ! "$srctree" -ef .; then 122 res="$res$(collect_files "$srctree"/localversion*)" 123fi 124 125# CONFIG_LOCALVERSION and LOCALVERSION (if set) |
126config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION="\(.*\)"$/\1/p' include/config/auto.conf) | 126config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf) |
127res="${res}${config_localversion}${LOCALVERSION}" 128 129# scm version string if not at a tagged commit 130if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then 131 # full scm version string 132 res="$res$(scm_version)" 133elif [ "${LOCALVERSION+set}" != "set" ]; then 134 # If the variable LOCALVERSION is not set, append a plus 135 # sign if the repository is not in a clean annotated or 136 # signed tagged state (as git describe only looks at signed 137 # or annotated tags - git tag -a/-s). 138 # 139 # If the variable LOCALVERSION is set (including being set 140 # to an empty string), we don't want to append a plus sign. 141 scm=$(scm_version --short) 142 res="$res${scm:++}" 143fi 144 145echo "$res" | 127res="${res}${config_localversion}${LOCALVERSION}" 128 129# scm version string if not at a tagged commit 130if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then 131 # full scm version string 132 res="$res$(scm_version)" 133elif [ "${LOCALVERSION+set}" != "set" ]; then 134 # If the variable LOCALVERSION is not set, append a plus 135 # sign if the repository is not in a clean annotated or 136 # signed tagged state (as git describe only looks at signed 137 # or annotated tags - git tag -a/-s). 138 # 139 # If the variable LOCALVERSION is set (including being set 140 # to an empty string), we don't want to append a plus sign. 141 scm=$(scm_version --short) 142 res="$res${scm:++}" 143fi 144 145echo "$res" |