diff --git a/make-os b/make-os index 2514670..e0fe996 100755 --- a/make-os +++ b/make-os @@ -1,10 +1,14 @@ #!/usr/bin/env bash +if [ "$1" = "" ]; then + echo "Define i386/amd64 as the first argument." + exit 1 +fi cd "$(dirname "$(realpath -s "$BASH_SOURCE")")" source shell source "env-$1" -make-base # Base image -apply-stage "$OPUS_HOME/input/stage01" "$OPUS_OUTPUT/base" # Packages (non-graphical) -apply-stage "$OPUS_HOME/input/stage50" "$OPUS_OUTPUT/base" # Packages (graphical) -apply-stage "$OPUS_HOME/input/stage98" "$OPUS_OUTPUT/base" # Default configs, etc. -apply-stage "$OPUS_HOME/input/stage99" "$OPUS_OUTPUT/base" # Disk image preparation -make-image "$OPUS_OUTPUT/base" # Disk image \ No newline at end of file +make-base "$OPUS_OUTPUT/$1" "$OPUS_OUTPUT/$1" # Base image +apply-stage "$OPUS_HOME/input/stage01" "$OPUS_OUTPUT/$1" # Packages (non-graphical) +apply-stage "$OPUS_HOME/input/stage50" "$OPUS_OUTPUT/$1" # Packages (graphical) +apply-stage "$OPUS_HOME/input/stage98" "$OPUS_OUTPUT/$1" # Default configs, etc. +apply-stage "$OPUS_HOME/input/stage99" "$OPUS_OUTPUT/$1" # Disk image preparation +make-image "$OPUS_OUTPUT/$1" "$OPUS_OUTPUT/${OPUS_NAME}-${OPUS_DIST}-${OPUS_ARCH}_$(date "+%Y.%m.%d-%H.%M.%S").img" # Disk image \ No newline at end of file diff --git a/make-os-proprietary b/make-os-proprietary index 4de7fd1..d7c4090 100755 --- a/make-os-proprietary +++ b/make-os-proprietary @@ -1,12 +1,16 @@ #!/usr/bin/env bash +if [ "$1" = "" ]; then + echo "Define i386/amd64 as the first argument." + exit 1 +fi cd "$(dirname "$(realpath -s "$BASH_SOURCE")")" source shell source "env-$1" source "env-proprietary" make-base # Base image -apply-stage "$OPUS_HOME/input/stage01" "$OPUS_OUTPUT/base" # Packages (non-graphical) -apply-stage "$OPUS_HOME/input/stage49" "$OPUS_OUTPUT/base" # Packages (proprietary firmware) -apply-stage "$OPUS_HOME/input/stage50" "$OPUS_OUTPUT/base" # Packages (graphical) -apply-stage "$OPUS_HOME/input/stage98" "$OPUS_OUTPUT/base" # Default configs, etc. -apply-stage "$OPUS_HOME/input/stage99" "$OPUS_OUTPUT/base" # Disk image preparation -make-image "$OPUS_OUTPUT/base" # Disk image \ No newline at end of file +apply-stage "$OPUS_HOME/input/stage01" "$OPUS_OUTPUT/$1" # Packages (non-graphical) +apply-stage "$OPUS_HOME/input/stage49" "$OPUS_OUTPUT/$1" # Packages (proprietary firmware) +apply-stage "$OPUS_HOME/input/stage50" "$OPUS_OUTPUT/$1" # Packages (graphical) +apply-stage "$OPUS_HOME/input/stage98" "$OPUS_OUTPUT/$1" # Default configs, etc. +apply-stage "$OPUS_HOME/input/stage99" "$OPUS_OUTPUT/$1" # Disk image preparation +make-image "$OPUS_OUTPUT/$1" "$OPUS_OUTPUT/${OPUS_NAME}-${OPUS_DIST}-${OPUS_ARCH}_$(date "+%Y.%m.%d-%H.%M.%S").img" # Disk image \ No newline at end of file diff --git a/path/make-base b/path/make-base index 3474220..80444e5 100755 --- a/path/make-base +++ b/path/make-base @@ -1,8 +1,8 @@ #!/usr/bin/env bash -if [ -d "$OPUS_OUTPUT/base" ]; then - rm -rf "$OPUS_OUTPUT/base" +if [ -d "$1" ]; then + rm -rf "$1" fi -mkdir "$OPUS_OUTPUT/base" -debootstrap --arch="$OPUS_ARCH" "$OPUS_DIST" "$OPUS_OUTPUT/base" "$OPUS_URL" -fchroot "$OPUS_OUTPUT/base" apt -y autoclean -find "$OPUS_OUTPUT/base/var/log" -type f -delete \ No newline at end of file +mkdir "$1" +debootstrap --arch="$OPUS_ARCH" "$OPUS_DIST" "$1" "$OPUS_URL" +fchroot "$1" apt -y autoclean +find "$1/var/log" -type f -delete \ No newline at end of file diff --git a/path/make-image b/path/make-image index 8c36bef..d1d0a6c 100755 --- a/path/make-image +++ b/path/make-image @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export DISK_IMAGE="$OPUS_OUTPUT/${OPUS_NAME}-${OPUS_DIST}-${OPUS_ARCH}_$(date "+%Y.%m.%d-%H.%M.%S").img" +export DISK_IMAGE="$2" export ROOT_MOUNT="$OPUS_OUTPUT/mount" # Get the approximate size required for the image