Skip to content

Commit cb54bc1

Browse files
Merge pull request #20 from RandomCoderOrg/anchor
Anchor for #16
2 parents 69390fa + dbc1ebd commit cb54bc1

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

.github/workflows/build-and-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
sudo bash build.sh -s jammy -v raw -a all
4848
sudo bash build.sh -s kinetic -v raw -a all
4949
sudo bash build.sh -s lunar -v raw -a all
50+
sudo bash build.sh -s focal -v raw -a all
5051
5152
- name: upload artifacts
5253
uses: actions/upload-artifact@v3

build.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@ msg() { echo -e "${*} \e[0m" >&2;:;}
3333
# DEFAULTS
3434
ARCH="all"
3535
VARIENT="raw"
36+
UD_ROOT_DIR=$(git rev-parse --show-toplevel)
3637

3738
function build() {
3839
# load suites
39-
_avalible_suites="$(find ./suites -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' ')"
40+
_avalible_suites="$(find ./suites -maxdepth 1 -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' ')"
4041

4142
# check is SUITE avalible in ./suites
4243
if [[ ! ${_avalible_suites} =~ $SUITE ]]; then
4344
die "$SUITE not found in ./suites"
4445
fi
4546

4647
# load avalible varients
47-
_avalible_varients=$(find ./suites/"$SUITE" -type f | cut -d / -f 4 | awk 'NF')
48+
_avalible_varients=$(find ./suites/"$SUITE" -type d | cut -d / -f 4 | awk 'NF' | uniq -u | tr '\n' ' ')
4849

4950
# check is varient script avalible
5051
if [[ ! ${_avalible_varients} =~ $VARIENT ]]; then
@@ -56,19 +57,19 @@ function build() {
5657
msg "SUITE=$SUITE"
5758
msg "Varient=$VARIENT"
5859
msg "ARCH=$ARCH"
59-
cd fs-cook || die "failed to cd ./fs-cook" # script need to executed from fs-cook root directory
6060

61-
# pre-exe task
62-
# copy everything in name $VARIENT-* to fs-cook
63-
cp -r ../suites/"$SUITE"/"$VARIENT"-* ./
64-
bash ../suites/"$SUITE"/"$VARIENT".sh "$ARCH"
61+
cp -r ./suites/$SUITE/$VARIENT/$VARIENT* fs-cook
62+
cd fs-cook || die "Failed to cd.."
63+
bash $VARIENT.sh $ARCH || die "build script failed"
64+
cd $UD_ROOT_DIR || die "Failed fto cd "
65+
rm -rf fs-cook/$VARIENT*
6566
}
6667

6768
function _list() {
68-
for _suite in $(find ./suites -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' '); do
69+
for _suite in $(find ./suites -maxdepth 1 -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' '); do
6970
echo "[SUITE] $_suite"
70-
for _varient in $(find ./suites/"$_suite" -type f ! -name '*-*' | cut -d / -f 4 | awk 'NF'); do
71-
echo -e "\t -$_varient" | cut -d . -f 1
71+
for _varient in $(find ./suites/"$_suite" -type d ! -name '*-*' | cut -d / -f 4 | awk 'NF' | uniq -u | tr '\n' ' '); do
72+
echo -e "\t -$_varient"
7273
done
7374
done
7475
}

suites/hirsute/raw.sh renamed to suites/focal/raw/raw.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export ENABLE_EXIT
1212
export ENABLE_USER_SETUP
1313
export INCLUDE_PACKAGES
1414

15-
SUITE="hirsute"
15+
SUITE="focal"
1616
frn="out/$SUITE-raw"
1717
OVERRIDER_COMPRESSION_TYPE="gzip"
1818
ENABLE_EXIT=true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)