public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:master commit in: targets/stage4/, targets/embedded/, targets/netboot2/, targets/livecd-stage2/
@ 2020-04-03  7:48 Matt Turner
  0 siblings, 0 replies; only message in thread
From: Matt Turner @ 2020-04-03  7:48 UTC (permalink / raw
  To: gentoo-commits

commit:     cdc73ec88d9cb199c2376fcc9c49102e0962ceb0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  3 05:24:14 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr  3 07:47:45 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cdc73ec8

targets: Use copy_to_chroot() more places

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/embedded/controller.sh      |  8 +++-----
 targets/livecd-stage2/controller.sh |  7 ++-----
 targets/netboot2/controller.sh      | 13 ++++---------
 targets/stage4/controller.sh        |  8 ++++----
 4 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/targets/embedded/controller.sh b/targets/embedded/controller.sh
index 7a2b59ab..7e33ed49 100755
--- a/targets/embedded/controller.sh
+++ b/targets/embedded/controller.sh
@@ -42,11 +42,9 @@ case ${1} in
 	kernel)
 		shift
 		export clst_kname="${1}"
-		# if we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
+
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 		delete_from_chroot /tmp/linuxrc
 	;;

diff --git a/targets/livecd-stage2/controller.sh b/targets/livecd-stage2/controller.sh
index 5ae268f8..f9bc7b7e 100755
--- a/targets/livecd-stage2/controller.sh
+++ b/targets/livecd-stage2/controller.sh
@@ -18,11 +18,8 @@ case $1 in
 		shift
 		export clst_kname="$1"
 
-		# if we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 		delete_from_chroot /tmp/linuxrc
 

diff --git a/targets/netboot2/controller.sh b/targets/netboot2/controller.sh
index a5bb498c..89bb149d 100755
--- a/targets/netboot2/controller.sh
+++ b/targets/netboot2/controller.sh
@@ -27,15 +27,10 @@ case ${1} in
 		shift
 		export clst_kname="$1"
 
-		# if we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
-		if [ -n "${clst_busybox_config}" ]
-		then
-			cp ${clst_busybox_config} ${clst_chroot_path}/tmp/busy-config
-		fi
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
+		[ -n "${clst_busybox_config}" ] && \
+			copy_to_chroot ${clst_busybox_config} /tmp/busy-config
 
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 

diff --git a/targets/stage4/controller.sh b/targets/stage4/controller.sh
index cac1212d..85db8c1b 100755
--- a/targets/stage4/controller.sh
+++ b/targets/stage4/controller.sh
@@ -22,13 +22,13 @@ case $1 in
 	kernel)
 		shift
 		export clst_kname="$1"
+
 		# If we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 		delete_from_chroot /tmp/linuxrc
+
 		extract_modules ${clst_chroot_path} ${clst_kname}
 		# Do we need this one?
 #		extract_kernel ${clst_chroot_path}/boot ${clst_kname}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-03  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03  7:48 [gentoo-commits] proj/catalyst:master commit in: targets/stage4/, targets/embedded/, targets/netboot2/, targets/livecd-stage2/ Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox