mirror of
https://github.com/rancher/os-kernel.git
synced 2025-06-26 05:31:33 +00:00
Fix script format
This commit is contained in:
parent
b5b5441ded
commit
12d4f9ee95
@ -2,9 +2,9 @@
|
||||
set -e
|
||||
|
||||
if [[ "$KERNEL_TAG" == "" ]]; then
|
||||
echo "ERROR: Please set the KERNEL_TAG (the mainline KERNEL version is also the git tag) you're building"
|
||||
echo " e.g., KERNEL_TAG=4.9.10 make release"
|
||||
exit 1
|
||||
echo "ERROR: Please set the KERNEL_TAG (the mainline KERNEL version is also the git tag) you're building"
|
||||
echo " e.g., KERNEL_TAG=4.9.10 make release"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: ${ARTIFACTS:=$(pwd)/assets}
|
||||
|
@ -15,16 +15,16 @@ MODULE_LIST=$(readlink -f modules.list)
|
||||
MODULE_EXTRA_LIST=$(readlink -f modules-extra.list)
|
||||
|
||||
if [ -e "/source/dist/kernel/linux-${KERNEL_VERSION}-x86.tar.gz" ]; then
|
||||
echo "skipping kernel build - found linux-${KERNEL_VERSION}-rancher-x86.tar.gz in ./dist/kernel/"
|
||||
echo "skipping kernel build - found linux-${KERNEL_VERSION}-rancher-x86.tar.gz in ./dist/kernel/"
|
||||
else
|
||||
cd ${BUILD}/${DIR}
|
||||
make oldconfig
|
||||
KVER=$(make kernelrelease)
|
||||
if [ -e "linux-${KERNEL_VERSION}-x86.tar" ] \
|
||||
&& [ "$KVER" == "$KERNEL_VERSION" ]; then
|
||||
echo "Skipping kernel build, found linux-${KERNEL_VERSION}-x86.tar in $(pwd)"
|
||||
else
|
||||
echo "building $KVER"
|
||||
make -j$(nproc) tar-pkg
|
||||
fi
|
||||
cd ${BUILD}/${DIR}
|
||||
make oldconfig
|
||||
KVER=$(make kernelrelease)
|
||||
if [ -e "linux-${KERNEL_VERSION}-x86.tar" ] \
|
||||
&& [ "$KVER" == "$KERNEL_VERSION" ]; then
|
||||
echo "Skipping kernel build, found linux-${KERNEL_VERSION}-x86.tar in $(pwd)"
|
||||
else
|
||||
echo "building $KVER"
|
||||
make -j$(nproc) tar-pkg
|
||||
fi
|
||||
fi
|
||||
|
@ -6,8 +6,8 @@ cd $(dirname $0)/..
|
||||
./scripts/test-firmware
|
||||
|
||||
if ! ./scripts/download; then
|
||||
echo "blah"
|
||||
exit 1
|
||||
echo "blah"
|
||||
exit 1
|
||||
fi
|
||||
./scripts/extract
|
||||
run-parts -v ./scripts/hooks
|
||||
|
@ -28,8 +28,8 @@ pushd .
|
||||
cd ${DIR}
|
||||
echo "are there patches in ${PATCHES}"
|
||||
for p in ${PATCHES}/*.patch; do
|
||||
echo "patching $p"
|
||||
patch -p1 -i $p
|
||||
echo "patching $p"
|
||||
patch -p1 -i $p
|
||||
done
|
||||
popd
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
cd $(dirname $0)/..
|
||||
|
||||
if ! ./scripts/ci; then
|
||||
echo "build failure see release.log"
|
||||
exit 1
|
||||
echo "build failure see release.log"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
|
@ -13,24 +13,24 @@ echo "FIRMWARE test: $FIRMWARE"
|
||||
cd linux-firmware
|
||||
|
||||
for i in $(<$FIRMWARE); do
|
||||
if [ -e $i ]; then
|
||||
glob=$(echo $i | sed 's/^\(.*\)-\([^-]*\)\.\([^.]*\)/\1-*.\3/')
|
||||
#echo Found $i, trying $glob
|
||||
latest=$(ls $glob | xargs -n1 -I{} -- git log -1 --format="%ai {}" {} | sort | tail -n1 | cut -d " " -f4)
|
||||
if [ "$latest" != "$i" ]; then
|
||||
echo "ERROR: Firmware $i in $FIRMWARE is not the latest - update to $latest"
|
||||
STOP="1"
|
||||
echo $latest >> new-firmware
|
||||
else
|
||||
echo $i >> new-firmware
|
||||
fi
|
||||
if [ -e $i ]; then
|
||||
glob=$(echo $i | sed 's/^\(.*\)-\([^-]*\)\.\([^.]*\)/\1-*.\3/')
|
||||
#echo Found $i, trying $glob
|
||||
latest=$(ls $glob | xargs -n1 -I{} -- git log -1 --format="%ai {}" {} | sort | tail -n1 | cut -d " " -f4)
|
||||
if [ "$latest" != "$i" ]; then
|
||||
echo "ERROR: Firmware $i in $FIRMWARE is not the latest - update to $latest"
|
||||
STOP="1"
|
||||
echo $latest >> new-firmware
|
||||
else
|
||||
echo WARNING: Firmware listed in $FIRMWARE Not found $i
|
||||
echo $i >> new-firmware
|
||||
fi
|
||||
else
|
||||
echo WARNING: Firmware listed in $FIRMWARE Not found $i
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$STOP" != "" ]; then
|
||||
echo "Update the $FIRMWARE file:"
|
||||
cat new-firmware
|
||||
exit 1
|
||||
echo "Update the $FIRMWARE file:"
|
||||
cat new-firmware
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user