File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ do_build "out/fs" "arm64"
8080- - ` do_tar_bzip() ` : to compress in bzip format
8181- - ` do_tar_lz4() ` : to compress in lzip/lz4 format
8282- ` arch_translate() ` : takes care of translating arch to find qemu static builds
83+ - ` COPY() ` : to copy files to target filesystem
8384- ` die() ` : to echo an error message & exit if ` ENABLE_EXIT ` is set to true
8485- ` warn() ` : like ` die() ` without exit
8586- ` shout() ` : for printing logs
Original file line number Diff line number Diff line change @@ -456,6 +456,21 @@ run_shell_script() {
456456 echo " Done running script: $1 "
457457}
458458
459+ COPY () {
460+ local src=$1
461+ local dest=$2
462+
463+ if [ -d " $src " ]; then
464+ $SUDO cp -vr " $src " " $chroot_dir /$dest "
465+ else
466+ if [ -f " $src " ]; then
467+ $SUDO cp -v " $src " " $chroot_dir /$dest "
468+ else
469+ die " Couldn't find $src , no such file or directory"
470+ fi
471+ fi
472+ }
473+
459474install_pkg ()
460475{
461476 pkg_name=" $* "
You can’t perform that action at this time.
0 commit comments