draogn: modify push-kernel.sh script to handle different kernel repos

Allow push-kernel.sh script to update prebuilts from different kernel
repos.

Change-Id: I4ce2a83c049d026f9e9cfd45b13c23c9b5037b0c
diff --git a/push-kernel.sh b/push-kernel.sh
index 7aee2f3..500ab54 100755
--- a/push-kernel.sh
+++ b/push-kernel.sh
@@ -4,9 +4,11 @@
 
 show_usage()
 {
-	echo usage: $0 [artifact_path] [rootdir]
+	echo usage: $0 [artifact_path] [rootdir] [kernel_path]
 	echo For: echo Artifacts[smaug]: smaug-release/R45-7199.0.0
 	echo artifact_path=smaug-release/R45-7199.0.0
+	echo If kernel comes from nvidia-kernel:
+	echo kernel_path=src/partner_private/nvidia-kernel
 	exit 1
 }
 
@@ -15,6 +17,10 @@
 if [ -z "$TOP" ]; then
 	TOP="$(pwd)"
 fi
+kernel_path="$3"
+if [ -z "$kernel_path" ]; then
+	kernel_path="src/third_party/kernel/v3.18"
+fi
 
 gsbase=gs://chromeos-image-archive
 # smaug-release - works well
@@ -56,7 +62,7 @@
 fi
 bsdtar -s '/.*vmlinuz-3.18.*/Image.fit/' -jxf kernel.tbz2 '*vmlinuz-3.18*'
 rm kernel.tbz2
-newrev=$(gsutil.py cat ${gspath}/manifest.xml | grep 'path="src/third_party/kernel/v3.18"' | sed -e 's/.*revision="\([0123456789abcdef]\+\).*/\1/')
+newrev=$(gsutil.py cat ${gspath}/manifest.xml | grep "path=\"${kernel_path}\"" | sed -e 's/.*revision="\([0123456789abcdef]\+\).*/\1/')
 oldrev=$(git log --oneline | head -1 | sed -e "s/.*${preamble} \(.*\)/\1/")
 
 cd "$kernel"