Skip to content

Commit 720f41b

Browse files
committed
ign and isomod
1 parent 2d86234 commit 720f41b

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**/**__pycache__
22
SAFETY_LOCK
3-
**/archiso
3+
**/archiso**
44
**/**old.*
55
**/**.img
66
**/**.iso
@@ -50,3 +50,4 @@ requirements.txt
5050
/cmd_output.txt
5151
node_modules/
5252
uv.lock
53+
**.vscode/**

ISOMOD

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
#!/bin/bash
2-
ELEV="${ELEV:-"$ELEV"}"
3-
2+
ELEV="${ELEV:-sudo}"
43
# Strict
54
set -e #uo pipefail
65

76
# DO NOT RUN AS ROOT // Will prompt when needed
87
[ "$(id -u)" -eq 0 ] && echo "Error: Root not required." && exit 1
98

9+
THREADS="${THREADS:-$(nproc)}"
1010
# Build stage 1 ISO with slight modifs
1111
# Requires 'archiso'
12-
# Requires 'pacman-contrib' if this is enabled
13-
CACHING="${CACHING:-1}"
14-
1512
SILENT_MODE="${SILENT_MODE:-0}"
16-
CLEANUP="${CLEANUP:-1}"
1713
PRECLEAN="${PRECLEAN:-0}"
18-
THREADS="${THREADS:-$(nproc)}"
14+
CLEANUP="${CLEANUP:-1}"
1915
LOG_FILE="${LOG_FILE:-1}"
16+
# Requires 'pacman-contrib' if this is enabled
17+
CACHING="${CACHING:-0}"
2018

2119
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
2220

@@ -81,7 +79,10 @@ echo "Copy releng profile..."
8179
cp -r /usr/share/archiso/configs/releng/* "$PROFILE_DIR" || error_exit "Failed to copy releng profile"
8280

8381
echo "Mod ISO name..."
84-
sed -i 's/^iso_name=.*/iso_name="ArchMod"/' "$PROFILE_DIR/profiledef.sh"
82+
sed -i 's/^iso_name=.*/iso_name="EVOQUUS"/' "$PROFILE_DIR/profiledef.sh"
83+
84+
echo "Adding archinstoo to file_permissions..."
85+
sed -i '/^file_permissions=(/a\ ["/usr/local/bin/archinstoo"]="0:0:755"' "$PROFILE_DIR/profiledef.sh"
8586

8687
echo "Modifying COW overlay size..."
8788

@@ -102,16 +103,32 @@ cat >> "$PROFILE_DIR/airootfs/etc/motd" << EOF
102103
103104
Archinstoo Mods Projects
104105
Media Gen: ${BUILD_DATE}
106+
107+
Connect to the internet.
108+
Then 'archinstoo' for TUI installer.
105109
106110
EOF
107111

108-
# add git clone command to zsh history
109-
# allows for arrow up fatser testing
112+
# add git clone command to zsh history
113+
# allows for arrow up faster testing
110114
echo "Adding to zsh history..."
111115
cat > "$PROFILE_DIR/airootfs/root/.zsh_history" << 'HISTEOF'
112-
: 1728000000:0;pacman-key --init && git clone https://github.com/h8d13/archinstoo && cd archinstoo/archinstoo && python -m archinstall --debug
116+
: 1728000000:0;pacman-key --init && git clone https://github.com/h8d13/archinstoo && cd archinstoo/archinstoo && python -m archinstall --debug --advanced
113117
HISTEOF
114118

119+
# add 'archinstoo' command to PATH
120+
echo "Adding archinstoo command..."
121+
mkdir -p "$PROFILE_DIR/airootfs/usr/local/bin"
122+
cat > "$PROFILE_DIR/airootfs/usr/local/bin/archinstoo" << 'CMDEOF'
123+
#!/bin/bash
124+
set -e
125+
pacman-key --init
126+
git clone https://github.com/h8d13/archinstoo /root/archinstoo
127+
cd /root/archinstoo/archinstoo
128+
exec python -m archinstall --debug "$@"
129+
CMDEOF
130+
chmod +x "$PROFILE_DIR/airootfs/usr/local/bin/archinstoo"
131+
115132
echo "Styling pacman.conf (Color + ILoveCandy)..."
116133
# Ensure pacman.conf exists in airootfs/etc
117134
mkdir -p "$PROFILE_DIR/airootfs/etc"
@@ -154,6 +171,4 @@ echo "Restoring permissions..."
154171
"$ELEV" chown -R "$USER":"$USER" "$OUTPUT_DIR"
155172
echo ""
156173

157-
cleanup
158-
exit 0
159-
# done
174+
cleanup && exit 0

0 commit comments

Comments
 (0)