github-apply.sh: add script to rebase, merge and close Github pull requests
[maintainer-tools.git] / update_kernel.sh
index 061e6e7fb75bbf7461ef0eb80b988fac33d43c08..0cbdb1d28f0b9466d528ddaa2a7b8ec7aa95a117 100755 (executable)
@@ -12,7 +12,7 @@ UPDATE=0
 KERNEL=
 PATCHVER=
 
-while [ $# > 0 ]; do
+while [ $# -gt 0 ]; do
        case $1 in
                -b|--build)
                        BUILD=1
@@ -155,7 +155,7 @@ if [ "$UPDATE" -eq 1 ]; then
                CHECKSUM=$(./staging_dir/host/bin/mkhash sha256 dl/linux-$PATCHVER.tar.xz)
        fi
 
-       $CMD sed -i include/kernel-version.mk \
+       $CMD ./staging_dir/host/bin/sed -i include/kernel-version.mk \
                -e "s|LINUX_VERSION-${KERNEL} =.*|LINUX_VERSION-${KERNEL} = ${NEWVER}|" \
                -e "s|LINUX_KERNEL_HASH-${KERNEL}.*|LINUX_KERNEL_HASH-${PATCHVER} = ${CHECKSUM}|"
 fi