]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
create_debug_archive.sh: chroot command cannot resolve *.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Mon, 28 Jul 2014 17:23:10 +0000 (19:23 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Mon, 28 Jul 2014 17:23:10 +0000 (19:23 +0200)
liveboot-dbg-tar/create_debug_archive.sh

index 1056883ece8ed23be6f9096cae1a15a63eecb572..56f87864e6f310b6542763cbdad862b2220d96ef 100755 (executable)
@@ -3,6 +3,7 @@
 set -eux
 
 DIST=squeeze
+ARCH=amd64
 
 script_dir="$( cd "$( dirname "$0" )" && pwd )"
 liveboot_id="$LIVEBOOT_BUILD_NUMBER"
@@ -57,22 +58,22 @@ run_in_chroot aptitude update
 
 # assemble ethoip6 debug directory
 run_in_chroot aptitude download profitbricks-linux-source-pserver=$kernel_ver
-run_in_chroot dpkg -x profitbricks-linux-source-pserver_$kernel_ver*.deb kernel_source
-run_in_chroot mv kernel_source/usr/src/linux-*-pserver $assembledir/
+run_in_chroot dpkg -x profitbricks-linux-source-pserver_${kernel_ver}_${ARCH}.deb kernel_source
+run_in_chroot bash -c "mv kernel_source/usr/src/linux-*-pserver $assembledir/"
 
 run_in_chroot aptitude download profitbricks-linux-image-pserver-dbg=$kernel_ver
-run_in_chroot dpkg -x profitbricks-linux-image-pserver-dbg_$kernel_ver*.deb kernel_dbg
+run_in_chroot dpkg -x profitbricks-linux-image-pserver-dbg_${kernel_ver}_${ARCH}.deb kernel_dbg
 run_in_chroot mkdir -p $assembledir/linux-$kernel_ver-pserver-dbg
-run_in_chroot mv kernel_dbg/usr/lib/debug/vmlinux* kernel_dbg/usr/lib/debug/lib/modules/*-pserver $assembledir/linux-$kernel_ver-pserver-dbg
+run_in_chroot bash -c "mv kernel_dbg/usr/lib/debug/vmlinux* kernel_dbg/usr/lib/debug/lib/modules/*-pserver $assembledir/linux-$kernel_ver-pserver-dbg"
 
 # assemble ethoip6 debug directory
 
 run_in_chroot aptitude download ethoip6-sources=$ethoip6_ver
-run_in_chroot dpkg -x ethoip6-sources_$ethoip6_ver*.deb ethoip6_src
-run_in_chroot mv ethoip6_src/usr/src/ethoip6* $assembledir/
+run_in_chroot dpkg -x ethoip6-sources_${ethoip6_ver}_${ARCH}.deb ethoip6_src
+run_in_chroot bash -c "mv ethoip6_src/usr/src/ethoip6* $assembledir/"
 
 run_in_chroot aptitude download profitbricks-ethoip6-modules-pserver-dbg=$ethoip6_ver
-run_in_chroot dpkg -x profitbricks-ethoip6-modules-pserver-dbg_$ethoip6_ver*.deb ethoip6_dbg
+run_in_chroot dpkg -x profitbricks-ethoip6-modules-pserver-dbg_${ethoip6_ver}_${ARCH}.deb ethoip6_dbg
 run_in_chroot mkdir -p $assembledir/ethoip6-$ethoip6_ver-dbg
 run_in_chroot find ethoip6_dbg -name "*.ko" -exec mv {} $assembledir/ethoip6-$ethoip6_ver-dbg/ \;