summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xalap.sh21
-rwxr-xr-xbuild.sh6
-rw-r--r--releng/airootfs/etc/profile.d/raveos-fastfetch.sh2
-rwxr-xr-xreleng/airootfs/usr/share/calamares/kernel-install/95-raveos.install38
-rwxr-xr-xscripts/discord-notify.sh6
5 files changed, 29 insertions, 44 deletions
diff --git a/alap.sh b/alap.sh
deleted file mode 100755
index 76acfdf..0000000
--- a/alap.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-OUTDIR="$(pwd)/output"
-WORKDIR="$(pwd)/output/work"
-
-echo "==> Cleaning previous builds..."
-rm -rf "$OUTDIR"
-mkdir -p "$OUTDIR"
-
-echo "==> Building RaveOS ISO..."
-echo " Output: $OUTDIR"
-echo " Work: $WORKDIR"
-echo ""
-
-mkarchiso -v -w "$WORKDIR" -o "$OUTDIR" releng/
-
-echo ""
-echo "==> Build completed successfully!"
-echo ""
-ls -lh "$OUTDIR"/*.iso \ No newline at end of file
diff --git a/build.sh b/build.sh
index 76acfdf..551fe38 100755
--- a/build.sh
+++ b/build.sh
@@ -4,6 +4,9 @@ set -e
OUTDIR="$(pwd)/output"
WORKDIR="$(pwd)/output/work"
+CACHEDIR="$(pwd)/cache/pacman/pkg"
+mkdir -p "$CACHEDIR"
+
echo "==> Cleaning previous builds..."
rm -rf "$OUTDIR"
mkdir -p "$OUTDIR"
@@ -11,9 +14,10 @@ mkdir -p "$OUTDIR"
echo "==> Building RaveOS ISO..."
echo " Output: $OUTDIR"
echo " Work: $WORKDIR"
+echo " Cache: $CACHEDIR"
echo ""
-mkarchiso -v -w "$WORKDIR" -o "$OUTDIR" releng/
+mkarchiso -v -c "$CACHEDIR" -w "$WORKDIR" -o "$OUTDIR" releng/
echo ""
echo "==> Build completed successfully!"
diff --git a/releng/airootfs/etc/profile.d/raveos-fastfetch.sh b/releng/airootfs/etc/profile.d/raveos-fastfetch.sh
index c97dc67..55460b8 100644
--- a/releng/airootfs/etc/profile.d/raveos-fastfetch.sh
+++ b/releng/airootfs/etc/profile.d/raveos-fastfetch.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# RaveOS terminal greeting
# Guard: prevent double execution (login shell profile.d + .bashrc)
-[[ -n "$_RAVEOS_GREETING_DONE" ]] && return 2>/dev/null
+[[ -n "$_RAVEOS_GREETING_DONE" ]] && { return 2>/dev/null || exit 0; }
_RAVEOS_GREETING_DONE=1
if command -v fastfetch &>/dev/null; then
diff --git a/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install b/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
index 316204c..4bb0c6b 100755
--- a/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
+++ b/releng/airootfs/usr/share/calamares/kernel-install/95-raveos.install
@@ -22,19 +22,19 @@ ENTRY_FILE="$ENTRY_DIR/raveos.conf"
LINUX_IMAGE="/vmlinuz-linux-cachyos"
INITRAMFS_IMAGE="/initramfs-linux-cachyos.img"
-# --------------------------------------------------
-# Microcode (must be first initrd)
-# --------------------------------------------------
+# CPU Microcode detection (Intel vs AMD)
MICROCODE=""
-[ -f "$BOOT_ROOT/intel-ucode.img" ] && MICROCODE="/intel-ucode.img"
-[ -f "$BOOT_ROOT/amd-ucode.img" ] && MICROCODE="/amd-ucode.img"
+CPU_VENDOR="$(grep -m1 'vendor_id' /proc/cpuinfo 2>/dev/null | awk '{print $3}' || true)"
+if [ "$CPU_VENDOR" = "GenuineIntel" ] && [ -f "$BOOT_ROOT/intel-ucode.img" ]; then
+ MICROCODE="/intel-ucode.img"
+elif [ "$CPU_VENDOR" = "AuthenticAMD" ] && [ -f "$BOOT_ROOT/amd-ucode.img" ]; then
+ MICROCODE="/amd-ucode.img"
+else
+ [ -f "$BOOT_ROOT/intel-ucode.img" ] && MICROCODE="/intel-ucode.img"
+ [ -f "$BOOT_ROOT/amd-ucode.img" ] && MICROCODE="/amd-ucode.img"
+fi
-# --------------------------------------------------
-# Root device detection
-# --------------------------------------------------
-# findmnt can come back empty depending on the chroot/mount-namespace
-# context this hook runs in (e.g. during pacstrap). Fall back to
-# /proc/mounts, and finally /etc/fstab (once it exists), before giving up.
+# Root device detection with fallback
ROOT_SRC="$(findmnt -no SOURCE / || true)"
ROOT_FS="$(findmnt -no FSTYPE / || true)"
ROOT_OPTS="$(findmnt -no OPTIONS / || true)"
@@ -51,9 +51,6 @@ if [ -z "$ROOT_SRC" ] && [ -f /etc/fstab ]; then
ROOT_OPTS="$(awk '$2 == "/" {print $4; exit}' /etc/fstab)"
fi
-# /proc/mounts and /etc/fstab may give "UUID=xxxx"/"PARTUUID=xxxx" directly
-# instead of a /dev/ path -- resolve to an actual device node so the blkid
-# lookups below work either way.
case "$ROOT_SRC" in
UUID=*|PARTUUID=*|LABEL=*)
RESOLVED="$(blkid -t "$ROOT_SRC" -o device 2>/dev/null || true)"
@@ -63,7 +60,7 @@ esac
OPTIONS="rw quiet splash"
-# LUKS
+# LUKS Encryption & Root Device Fallbacks
if [[ "$ROOT_SRC" == /dev/mapper/* ]]; then
UUID="$(blkid -s UUID -o value "$ROOT_SRC" || true)"
if [ -n "$UUID" ]; then
@@ -73,7 +70,16 @@ if [[ "$ROOT_SRC" == /dev/mapper/* ]]; then
fi
else
PARTUUID="$(blkid -s PARTUUID -o value "$ROOT_SRC" || true)"
- [ -n "$PARTUUID" ] && OPTIONS="root=PARTUUID=$PARTUUID $OPTIONS"
+ if [ -n "$PARTUUID" ]; then
+ OPTIONS="root=PARTUUID=$PARTUUID $OPTIONS"
+ else
+ UUID="$(blkid -s UUID -o value "$ROOT_SRC" || true)"
+ if [ -n "$UUID" ]; then
+ OPTIONS="root=UUID=$UUID $OPTIONS"
+ else
+ OPTIONS="root=$ROOT_SRC $OPTIONS"
+ fi
+ fi
fi
# --------------------------------------------------
diff --git a/scripts/discord-notify.sh b/scripts/discord-notify.sh
index df5d60a..0cb0fb3 100755
--- a/scripts/discord-notify.sh
+++ b/scripts/discord-notify.sh
@@ -19,11 +19,7 @@ CONTENT="@everyone
> Letoltes: https://links.rp1.hu/raveos-download
> SHA256: \`${ISO_SHA256}\`"
-JSON=$(python3 -c "
-import json
-content = '''${CONTENT}'''
-print(json.dumps({'content': content, 'allowed_mentions': {'parse': ['everyone']}}, ensure_ascii=False))
-")
+JSON=$(python3 -c "import sys, json; print(json.dumps({'content': sys.argv[1], 'allowed_mentions': {'parse': ['everyone']}}, ensure_ascii=False))" "${CONTENT}")
curl -s \
-F "payload_json=${JSON}" \