From 308743294adb41a73677d840d624c639c846e780 Mon Sep 17 00:00:00 2001 From: saicharankandukuri Date: Thu, 20 Apr 2023 13:05:32 +0530 Subject: [PATCH 1/2] feat: folders for varients --- build.sh | 21 ++++++++++--------- suites/hirsute/{ => raw}/raw.sh | 0 suites/jammy/{ => raw}/raw.sh | 0 suites/jammy/{ => xfce4Raw}/xfce4Raw-setup.sh | 0 suites/jammy/{ => xfce4Raw}/xfce4Raw.sh | 0 suites/kinetic/{ => raw}/raw.sh | 0 suites/lunar/{ => raw}/raw.sh | 0 7 files changed, 11 insertions(+), 10 deletions(-) rename suites/hirsute/{ => raw}/raw.sh (100%) rename suites/jammy/{ => raw}/raw.sh (100%) rename suites/jammy/{ => xfce4Raw}/xfce4Raw-setup.sh (100%) rename suites/jammy/{ => xfce4Raw}/xfce4Raw.sh (100%) rename suites/kinetic/{ => raw}/raw.sh (100%) rename suites/lunar/{ => raw}/raw.sh (100%) diff --git a/build.sh b/build.sh index 6d92850..f6d9bad 100644 --- a/build.sh +++ b/build.sh @@ -33,10 +33,11 @@ msg() { echo -e "${*} \e[0m" >&2;:;} # DEFAULTS ARCH="all" VARIENT="raw" +UD_ROOT_DIR=$(git rev-parse --show-toplevel) function build() { # load suites - _avalible_suites="$(find ./suites -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' ')" + _avalible_suites="$(find ./suites -maxdepth 1 -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' ')" # check is SUITE avalible in ./suites if [[ ! ${_avalible_suites} =~ $SUITE ]]; then @@ -44,7 +45,7 @@ function build() { fi # load avalible varients - _avalible_varients=$(find ./suites/"$SUITE" -type f | cut -d / -f 4 | awk 'NF') + _avalible_varients=$(find ./suites/"$SUITE" -type d | cut -d / -f 4 | awk 'NF' | uniq -u | tr '\n' ' ') # check is varient script avalible if [[ ! ${_avalible_varients} =~ $VARIENT ]]; then @@ -56,19 +57,19 @@ function build() { msg "SUITE=$SUITE" msg "Varient=$VARIENT" msg "ARCH=$ARCH" - cd fs-cook || die "failed to cd ./fs-cook" # script need to executed from fs-cook root directory - # pre-exe task - # copy everything in name $VARIENT-* to fs-cook - cp -r ../suites/"$SUITE"/"$VARIENT"-* ./ - bash ../suites/"$SUITE"/"$VARIENT".sh "$ARCH" + cp -r ./suites/$SUITE/$VARIENT/$VARIENT* fs-cook + cd fs-cook || die "Failed to cd.." + bash $VARIENT.sh $ARCH || die "build script failed" + cd $UD_ROOT_DIR || die "Failed fto cd " + rm -rf fs-cook/$VARIENT* } function _list() { - for _suite in $(find ./suites -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' '); do + for _suite in $(find ./suites -maxdepth 1 -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' '); do echo "[SUITE] $_suite" - for _varient in $(find ./suites/"$_suite" -type f ! -name '*-*' | cut -d / -f 4 | awk 'NF'); do - echo -e "\t -$_varient" | cut -d . -f 1 + for _varient in $(find ./suites/"$_suite" -type d ! -name '*-*' | cut -d / -f 4 | awk 'NF' | uniq -u | tr '\n' ' '); do + echo -e "\t -$_varient" done done } diff --git a/suites/hirsute/raw.sh b/suites/hirsute/raw/raw.sh similarity index 100% rename from suites/hirsute/raw.sh rename to suites/hirsute/raw/raw.sh diff --git a/suites/jammy/raw.sh b/suites/jammy/raw/raw.sh similarity index 100% rename from suites/jammy/raw.sh rename to suites/jammy/raw/raw.sh diff --git a/suites/jammy/xfce4Raw-setup.sh b/suites/jammy/xfce4Raw/xfce4Raw-setup.sh similarity index 100% rename from suites/jammy/xfce4Raw-setup.sh rename to suites/jammy/xfce4Raw/xfce4Raw-setup.sh diff --git a/suites/jammy/xfce4Raw.sh b/suites/jammy/xfce4Raw/xfce4Raw.sh similarity index 100% rename from suites/jammy/xfce4Raw.sh rename to suites/jammy/xfce4Raw/xfce4Raw.sh diff --git a/suites/kinetic/raw.sh b/suites/kinetic/raw/raw.sh similarity index 100% rename from suites/kinetic/raw.sh rename to suites/kinetic/raw/raw.sh diff --git a/suites/lunar/raw.sh b/suites/lunar/raw/raw.sh similarity index 100% rename from suites/lunar/raw.sh rename to suites/lunar/raw/raw.sh From dbc1ebd5a2aa05b362af9703ba1a495f37aa4128 Mon Sep 17 00:00:00 2001 From: saicharankandukuri Date: Thu, 20 Apr 2023 13:24:29 +0530 Subject: [PATCH 2/2] feat: move hitsute to focal (EOF) --- .github/workflows/build-and-release.yml | 1 + suites/{hirsute => focal}/raw/raw.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename suites/{hirsute => focal}/raw/raw.sh (99%) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 0841a52..1341adb 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -47,6 +47,7 @@ jobs: sudo bash build.sh -s jammy -v raw -a all sudo bash build.sh -s kinetic -v raw -a all sudo bash build.sh -s lunar -v raw -a all + sudo bash build.sh -s focal -v raw -a all - name: upload artifacts uses: actions/upload-artifact@v3 diff --git a/suites/hirsute/raw/raw.sh b/suites/focal/raw/raw.sh similarity index 99% rename from suites/hirsute/raw/raw.sh rename to suites/focal/raw/raw.sh index 693b481..f816c46 100644 --- a/suites/hirsute/raw/raw.sh +++ b/suites/focal/raw/raw.sh @@ -12,7 +12,7 @@ export ENABLE_EXIT export ENABLE_USER_SETUP export INCLUDE_PACKAGES -SUITE="hirsute" +SUITE="focal" frn="out/$SUITE-raw" OVERRIDER_COMPRESSION_TYPE="gzip" ENABLE_EXIT=true