Subject: fixed wrong directory-paths from previous commit

From: Andreas Loibl <[email-masked]>
Date: Fri, 25 Mar 2011 00:19:02 +0100

---
 scripts/build/lb_binary_burg  | 13 ++++++-------
 scripts/build/lb_binary_grub2 | 13 ++++++-------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/scripts/build/lb_binary_burg b/scripts/build/lb_binary_burg
index e2eea70..1bc16db 100755
--- a/scripts/build/lb_binary_burg
+++ b/scripts/build/lb_binary_burg
@@ -78,18 +78,17 @@ Burg_live_entry ()
                                 _NUMBER="$(echo ${LB_LINUX_FLAVOURS} | awk -v FLAVOUR="${FLAVOUR}" 'BEGIN{RS=" "} {if($1 == FLAVOUR) print NR}')"
                         fi
 
-                        if [ -e ${KERNEL_PATH}/${KERNEL} ]
+                        if [ -e binary/${KERNEL} ]
                         then
-                                mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${_NUMBER}
+                                mv binary/${KERNEL} "binary/$(dirname ${KERNEL})/vmlinuz${_NUMBER}"
+				KERNEL="$(dirname ${KERNEL})/vmlinuz${_NUMBER}"
                         fi
 
-                        if [ -e ${KERNEL_PATH}/${INITRD} ]
+                        if [ -e binary/${INITRD} ]
                         then
-                                mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${_NUMBER}.img
+                                mv binary/${INITRD} "binary/$(dirname ${INITRD})/initrd${_NUMBER}.img"
+				INITRD="$(dirname ${INITRD})/initrd${_NUMBER}.img"
                         fi
-
-                        KERNEL=vmlinuz${_NUMBER}
-                        INITRD=initrd${_NUMBER}.img
                 ;;
         esac
 
diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2
index fdfca0d..549274a 100755
--- a/scripts/build/lb_binary_grub2
+++ b/scripts/build/lb_binary_grub2
@@ -78,18 +78,17 @@ Grub_live_entry ()
                                 _NUMBER="$(echo ${LB_LINUX_FLAVOURS} | awk -v FLAVOUR="${FLAVOUR}" 'BEGIN{RS=" "} {if($1 == FLAVOUR) print NR}')"
                         fi
 
-                        if [ -e ${KERNEL_PATH}/${KERNEL} ]
+                        if [ -e binary/${KERNEL} ]
                         then
-                                mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${_NUMBER}
+                                mv binary/${KERNEL} "binary/$(dirname ${KERNEL})/vmlinuz${_NUMBER}"
+				KERNEL="$(dirname ${KERNEL})/vmlinuz${_NUMBER}"
                         fi
 
-                        if [ -e ${KERNEL_PATH}/${INITRD} ]
+                        if [ -e binary/${INITRD} ]
                         then
-                                mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${_NUMBER}.img
+                                mv binary/${INITRD} "binary/$(dirname ${INITRD})/initrd${_NUMBER}.img"
+				INITRD="$(dirname ${INITRD})/initrd${_NUMBER}.img"
                         fi
-
-                        KERNEL=vmlinuz${_NUMBER}
-                        INITRD=initrd${_NUMBER}.img
                 ;;
         esac
 
-- 
cgit v1.0