From 7be29a553f8bc94df3a6d67c497faa2371913dce Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Tue, 5 Jul 2016 20:34:43 +0800 Subject: install() -> install_live() --- buildlive | 13 +++++++++++-- distro/arch/install.sh | 3 ++- distro/fedora/install.sh | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/buildlive b/buildlive index 757c51a..6a1d578 100755 --- a/buildlive +++ b/buildlive @@ -5,6 +5,8 @@ set -e DISTROLIST=() ROOTPATH= DEVNAME= +KERNELDIR= +DATADIR= . functions.sh @@ -25,7 +27,14 @@ do case "$1" in --root=*) ROOTPATH=${1/--root=} - msg "Files will be copy to $ROOTPATH" + if [ -d "$ROOTPATH" ]; then + KERNELDIR="$ROOTPATH/liveusb-kernel" + DATADIR="$ROOTPATH/liveusb-data" + install -d "$KERNELDIR" "$DATADIR" + msg "Files will be copy to $ROOTPATH" + else + errmsg "Invalid root path $ROOTPATH" + fi ;; --dev=*) DEVNAME=${1/--dev=} @@ -64,6 +73,6 @@ do exit 1 fi - install + install_live done diff --git a/distro/arch/install.sh b/distro/arch/install.sh index 3d605bb..bb15685 100644 --- a/distro/arch/install.sh +++ b/distro/arch/install.sh @@ -1,8 +1,9 @@ ISOURL=iso/2016.08.01/archlinux-2016.08.01-dual.iso SHA1=6db5a9e46267ba7ec4d9ae79d141e5a6d9d3cf88 -install() { +install_live() { mount_iso + cp -r "$ROOTPATH" umount_iso } diff --git a/distro/fedora/install.sh b/distro/fedora/install.sh index 12f4377..5b81ffc 100644 --- a/distro/fedora/install.sh +++ b/distro/fedora/install.sh @@ -1,7 +1,7 @@ ISOURL=releases/24/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-24-1.2.iso SHA256=8e12d7ba1fcf3328b8514d627788ee0146c0eef75a5e27f0674ee1fe4f1feaf6 -install() { +install_live() { mount_iso umount_iso } -- cgit v1.2.3