Skip to content

Commit

Permalink
add profile support
Browse files Browse the repository at this point in the history
  • Loading branch information
YukariChiba committed Dec 29, 2023
1 parent c156a06 commit 8bcf805
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ isofs/
rootfs/
*.img
*.iso
*.sha256
pacman.ewe.conf
18 changes: 13 additions & 5 deletions gen.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

ISOARCH=x86_64
PROFILE=liveimage-minimal

ISOFILE=eweos-$ISOARCH-$PROFILE.iso

if [ ! -f "pacman.ewe.conf" ]; then
wget https://raw.githubusercontent.com/eweOS/packages/pacman/pacman.conf -O pacman.ewe.conf
sed -i "s/Architecture = auto/Architecture = $ISOARCH/g" pacman.ewe.conf
fi

function crsh(){
Expand All @@ -21,11 +27,11 @@ mkfs.fat -F 32 ./bootfs.img
sudo mkdir -p ./rootfs/boot
sudo mount ./bootfs.img ./rootfs/boot

sudo pacstrap -G -M -C ./pacman.ewe.conf ./rootfs base greetd tinyramfs linux efistub-tools neofetch vim sudo dinit
sudo pacstrap -G -M -C ./pacman.ewe.conf ./rootfs `cat profiles/$PROFILE/packages.txt | xargs`

cp ./configure.sh ./rootfs/configure.sh && chmod +x ./rootfs/configure.sh
cp ./profiles/$PROFILE/config.sh ./rootfs/config.sh && chmod +x ./rootfs/config.sh

crsh "/configure.sh"
crsh "/config.sh"

sudo umount ./rootfs/boot

Expand All @@ -34,13 +40,15 @@ sudo cp ./bootfs.img ./isofs/efi.img
sudo mksquashfs ./rootfs ./isofs/root.sfs

sudo xorriso -as mkisofs \
-o eweos.iso \
-o $ISOFILE \
-R -J -v -d -N \
-x eweos.iso \
-x $ISOFILE \
-hide-rr-moved \
-no-emul-boot \
-eltorito-platform efi \
-eltorito-boot efi.img \
-V "EWE_ISO" \
-A "eweOS Live ISO" \
isofs

sha256sum $ISOFILE > $ISOFILE.sha256
File renamed without changes.
9 changes: 9 additions & 0 deletions profiles/liveimage-minimal/packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
base
greetd
tinyramfs
linux
efistub-tools
neofetch
vim
sudo
dinit

0 comments on commit 8bcf805

Please sign in to comment.