1
0
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:
niusmallnan 2018-11-08 16:10:23 +08:00
parent b5b5441ded
commit 12d4f9ee95
6 changed files with 35 additions and 35 deletions

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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