mirror of
https://github.com/rancher/os-kernel.git
synced 2025-08-31 20:36:46 +00:00
Make source dir based on git tag
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
: ${KERNEL_URL:="https://github.com/rancher/linux/archive/Ubuntu-4.4.0-23.41-rancher2.tar.gz"}
|
||||
: ${KERNEL_SHA1:="62d171607f7f816b277fb4d4d58fb08a0c7960e5"}
|
||||
: ${KERNEL_URL:="https://github.com/rancher/linux/archive/Ubuntu-4.4.0-30.49-rancher.tar.gz"}
|
||||
: ${KERNEL_SHA1:="34b4b41128bed2f8ce585fbee1b893f47b1985da"}
|
||||
: ${ARTIFACTS:=$(pwd)/assets}
|
||||
: ${BUILD:=/usr/src}
|
||||
: ${CONFIG:=$(pwd)/config}
|
||||
|
@@ -4,12 +4,13 @@ set -e
|
||||
cd $(dirname $0)/..
|
||||
|
||||
source scripts/build-common
|
||||
source scripts/version
|
||||
|
||||
export CCACHE_DIR="${HOME}/.kernel-ccache"
|
||||
export CC="ccache gcc"
|
||||
export PATH="/usr/lib/ccache:$PATH"
|
||||
KERNEL=$(basename ${KERNEL_URL})
|
||||
DIR=${KERNEL/.tar.*//}
|
||||
DIR=${VERSION}
|
||||
FIRMWARE=$(readlink -f scripts/firmware)
|
||||
MODULE_LIST=$(readlink -f modules.list)
|
||||
MODULE_EXTRA_LIST=$(readlink -f modules-extra.list)
|
||||
|
11
scripts/entry
Executable file
11
scripts/entry
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
trap "rm -f $HOME/.bash_history" exit
|
||||
|
||||
mkdir -p bin
|
||||
if [ -e ./scripts/$1 ]; then
|
||||
./scripts/"$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
@@ -4,9 +4,10 @@ set -e
|
||||
cd $(dirname $0)/..
|
||||
|
||||
source scripts/build-common
|
||||
source scripts/version
|
||||
|
||||
KERNEL=$(basename ${KERNEL_URL})
|
||||
DIR=${KERNEL/.tar.*//}
|
||||
DIR=${VERSION}
|
||||
|
||||
mkdir -p ${BUILD}
|
||||
cd ${BUILD}
|
||||
|
14
scripts/version
Executable file
14
scripts/version
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
||||
DIRTY="-dirty"
|
||||
fi
|
||||
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
GIT_TAG=$(git tag -l --contains HEAD | head -n 1)
|
||||
|
||||
if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then
|
||||
VERSION=$GIT_TAG
|
||||
else
|
||||
VERSION="${COMMIT}${DIRTY}"
|
||||
fi
|
Reference in New Issue
Block a user