From 0c02fe3f41854e19d451d40fad3c5013e288c53d Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 31 Jan 2020 10:49:01 +0100 Subject: [PATCH] wip --- unbox.sh | 12 +++++++----- utils.sh | 21 --------------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/unbox.sh b/unbox.sh index b30df79..5fee337 100755 --- a/unbox.sh +++ b/unbox.sh @@ -23,9 +23,9 @@ function unbox_outer_stage(){ source repo/entry.sh mkdir -p target + export TARGET=$(pwd)/target if type -t first_stage > /dev/null; then - export TARGET=$(pwd)/target first_stage else echo first stage not found @@ -45,10 +45,12 @@ function unbox_outer_stage(){ mkdir -p target/root/unbox mount -o bind . target/root/unbox $CHROOT target /root/unbox/unbox.sh unbox_inner_stage - sleep 0.5 - mount | grep target | awk '{print $3}'| sort -r | while read LINE; do - umount -l $LINE; - done + + if type -t post_install_stage > /dev/null; then + post_install_stage + else + echo no post_install_stage found + fi exit 0 } diff --git a/utils.sh b/utils.sh index 753255a..7fc068e 100755 --- a/utils.sh +++ b/utils.sh @@ -5,24 +5,3 @@ function prefix_time(){ echo "["$(date)"] "$LINE done } - -function one_token_per_line(){ - for L in $1; do - echo $L - done -} - -function block_devices(){ - #lsblk -fPpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT - lsblk -frpno NAME -} - -function foo(){ - - while read LINE; do - ( - export $LINE - echo "> "$NAME - ) - done -}