File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33set -Eeuo pipefail
44
5+ # Determine script path
56script_path=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd)
67if [[ -n " ${1-" " } " ]]; then
78 profile_dir=" ${1-" ${script_path} /configs/xfce" } "
89 shift 1
910fi
1011work_dir=" $script_path /work"
11- cache_dir=" $work_dir /alteriso_cache"
1212
13- mkdir -p " $work_dir /archiso"
14- mkdir -p " $cache_dir "
13+ # Build the Go binary
14+ binfile=" $( mktemp -u) "
15+ go build -o " $binfile " " $script_path /src"
1516
16- # Generate archiso profile
17- " $script_path /gen.sh" -o " $work_dir /profile" " $profile_dir "
17+ # Set mkarchiso path
18+ PATH=" $( realpath " $script_path /../archiso/" ) :$PATH "
19+ export PATH
1820
19- sudo ALTERISO_PACMAN_CACHE=" $cache_dir " \
20- ../archiso/mkarchiso -v \
21- -w " $work_dir /archiso" \
22- -o " $script_path /out" \
23- " $work_dir /profile"
21+ # Execute the build command
22+ " $binfile " profile \
23+ --bootloaders " $script_path /bootloaders/" \
24+ --modules " $script_path /modules/" \
25+ build \
26+ --workdir " $work_dir " \
27+ --outdir " $script_path /out" \
28+ " $profile_dir " " $@ "
2429
25- # sudo ../archiso/mkarchiso \
26- # -v \
27- # -w "$work_dir/archiso" \
28- # -o "$script_path/out" \
29- # "$work_dir/profile"
30+ # Clean up
31+ " $binfile " clean --workdir " $work_dir "
32+ rm " $binfile "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -Eeuo pipefail
4+
5+ script_path=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd)
6+ if [[ -n " ${1-" " } " ]]; then
7+ profile_dir=" ${1-" ${script_path} /configs/xfce" } "
8+ shift 1
9+ fi
10+ work_dir=" $script_path /work"
11+ cache_dir=" $work_dir /alteriso_cache"
12+
13+ mkdir -p " $work_dir /archiso"
14+ mkdir -p " $cache_dir "
15+
16+ # Generate archiso profile
17+ " $script_path /gen.sh" -o " $work_dir /profile" " $profile_dir "
18+
19+ sudo ALTERISO_PACMAN_CACHE=" $cache_dir " \
20+ ../archiso/mkarchiso -v \
21+ -w " $work_dir /archiso" \
22+ -o " $script_path /out" \
23+ " $work_dir /profile"
24+
25+ # sudo ../archiso/mkarchiso \
26+ # -v \
27+ # -w "$work_dir/archiso" \
28+ # -o "$script_path/out" \
29+ # "$work_dir/profile"
You can’t perform that action at this time.
0 commit comments