mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 12:37:46 +00:00
* Change lazyvim and asdcontrol to packages * Remove asdcontrol and lazyvim * Add lazyvim setup * Don't trigger rebuild. We already rebuild later. * Add new pacman.conf after install * Update config to keep mirrors in mirrorlist * Add lazyvim setup back * Make webapp installer work with local images * Update tuis to work offline * Update pacman config situation * Extract the reboot segment into its own file * Explainer * Can't return in executed scripts * Add post-install * Extract the reboot segment into its own file * Fix rebase doubling up * Add run wrapper function for feedback * Redirect output to log * Move gnome updates to first-run * Add theme to first-run * Updat to try to get logging working * Create the file and give permissions * Test gsettings * Revert "Test gsettings" This reverts commit 49c27d319407f6c95fcbb4c5a2646e54b50c9ab4. * Stop logging * Add time outputs to end of logs * Rearrange some scripts to cleanup * Cleanup * Add timing to run script * Don't enable multilib for offline * Add prebuild ruby * Try spinner setup * Prevent exit 1 due to grep not matching * Update limine config to work for USB installs as well * Add offline install to env report * Fix grep pipefailure * Update logs exports to work with subshells * Fix backward logic * Attempt to fix logging again * Export chrootable for subshells * Clean up outputs * Move chrootable up * Source chroot instead * Changes for logging * Center up reboot notice * Update fixed paths * Update trap * Revert reverting precompiled ruby due to issues * Revert "Revert reverting precompiled ruby due to issues" This reverts commit c159e7dc51cfdd2fb750c49c66bc4468e1208446. * Remove junk to cleanup fixed paths now that we have relative * Add git branch check to transition beta to main * Log output * Add time output on summary screen * We don't need sudo here * Add ansi helpers to make code cleaner * Add dry-run helpers for testing * Split out some common / reused items * Add log output function * Use gum log to output cleaner * Cleanup * Update trap with options * Fix reboot and pad it * Cleanup * Add dry-run for testing * Use default $PADDING for gum * More styles * Styles and really exit * Update to new format * Add ansi vars * Update log output to prevent flickering * Fix logo exporting * Trap updates * Add exit handler * Prevent double-trapping * Update traps * Consolidate logic * Update reboot to work in chroot * Eliminate double-guard * Attempt to speed up by removing mkinitcpio hooks * Add multilib for nvidia users * Add back wireless-regdom * Remove dryrun items * Fix to be offline * Set fonts for plymouth to solve freetype2 issue * Required -y to run * Update omarchy-refresh-plymouth to account for limine changes * Update omarchy-refresh-plymouth to account for limine changes (#1575) * Required -y to run * Update omarchy-refresh-plymouth to account for limine changes --------- Co-authored-by: David Heinemeier Hansson <david@hey.com> * Update modes * Remove direct executions of .sh files * Add variable safety * Add omarchy-upload-log * Add broadcome fix for MBP * Prevent printing on screen when rebooting * Make packages list universal * Rename * Remove retry message * Fix packages target * Add system info to upload * Update variable name * Remove unnecessary executable statuses * Remove gesture default * Add bcm4360 fix to install * Add useful debug info * Add OMARCHY_PATH * Only look locally offline * Rename / rearrange files * Export so they're available to subshells * Update for alternate * Rearrange * Log install time if no arch * Add limine to packages list * Update comments * Update sizing method * Update mode switcher * Move icons to be embedded in installer * Set install mode to online * shebang and sudo * Remove deleted branch check * Elim banners * Elim verbosity * Rename LOG_FILE * Multilib on by default * Flip to positive * Switch to gnome-theme.sh for first run * Elim ansi-codes helper * Move guard up to be the first thing that's hit * Extract a couple of functions * Trim * Trim * Move back to trap * Update to single gum file * Just show total * Pulled function to a helper * Extract explaining function * Use complete conditional flows where possible * Reference variable close to its use * Use modern bash conditional syntax * Comment before function * Use a simpler shared exit headline Doesn't matter how we stopped, just that we did * CRs * Keep constants together * Style on comment * Explain QR Code * Modern bash conditional and use lowercase for all local variables * Use bash calculation syntax for numbers * Use calculation syntax where possible * cleanup was not intention revealing enough imo * Spacing * Retry won't produce something different in offline mode * Not needed * Use modern bash conditional style * String-wrapping not needed in [[ ]] * Might as well use constants for all of these * Don't need the wrapping * Move the output saving into where we're working with it * Not needed as long as we just source this * Gum is a helper * Slim down logging setup * Reflect broader scope of work * Everything should live in file * Simpler * Ordering * Style * Better separation of concerns * Stop pretending these are meant to run directly * Move all packaging execution together * No longer used in an offline centric setup * None of these are directly executable any more either * Modern bash conditional * Better name * Explain what's going on * Use modern bash conditional * Use modern bash styule * No need for bashing --------- Co-authored-by: David Heinemeier Hansson <david@hey.com> Co-authored-by: DoppioJP <jakub@doppio.jp>
127 lines
3.2 KiB
Bash
Executable File
127 lines
3.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Upload logs to 0x0.st
|
|
|
|
LOG_TYPE="${1:-install}"
|
|
TEMP_LOG="/tmp/upload-log.txt"
|
|
SYSTEM_INFO="/tmp/system-info.txt"
|
|
|
|
# Get system information if fastfetch is available
|
|
if command -v fastfetch >/dev/null 2>&1; then
|
|
{
|
|
echo "========================================="
|
|
echo "SYSTEM INFORMATION"
|
|
echo "========================================="
|
|
# Use fastfetch with no logo to get clean output
|
|
fastfetch --logo none --pipe 2>/dev/null || echo "Failed to get system info"
|
|
echo ""
|
|
echo "========================================="
|
|
echo "LOG CONTENT"
|
|
echo "========================================="
|
|
echo ""
|
|
} >"$SYSTEM_INFO"
|
|
else
|
|
# Fallback to basic info if fastfetch isn't available
|
|
{
|
|
echo "========================================="
|
|
echo "SYSTEM INFORMATION"
|
|
echo "========================================="
|
|
echo "Hostname: $(hostname)"
|
|
echo "Kernel: $(uname -r)"
|
|
echo "Date: $(date)"
|
|
echo ""
|
|
echo "========================================="
|
|
echo "LOG CONTENT"
|
|
echo "========================================="
|
|
echo ""
|
|
} >"$SYSTEM_INFO"
|
|
fi
|
|
|
|
case "$LOG_TYPE" in
|
|
install)
|
|
ARCHINSTALL_LOG="/var/log/archinstall/install.log"
|
|
OMARCHY_LOG="/var/log/omarchy-install.log"
|
|
|
|
# Combine system info with logs
|
|
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
cat $ARCHINSTALL_LOG $OMARCHY_LOG >>"$TEMP_LOG" 2>/dev/null
|
|
|
|
if [ ! -s "$TEMP_LOG" ]; then
|
|
echo "Error: No install logs found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Uploading installation log to 0x0.st..."
|
|
;;
|
|
|
|
this-boot)
|
|
# Combine system info with boot logs
|
|
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
journalctl -b 0 >>"$TEMP_LOG" 2>/dev/null
|
|
|
|
if [ ! -s "$TEMP_LOG" ]; then
|
|
echo "Error: No logs found for current boot"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Uploading current boot logs to 0x0.st..."
|
|
;;
|
|
|
|
last-boot)
|
|
# Combine system info with previous boot logs
|
|
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
journalctl -b -1 >>"$TEMP_LOG" 2>/dev/null
|
|
|
|
if [ ! -s "$TEMP_LOG" ]; then
|
|
echo "Error: No logs found for previous boot"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Uploading previous boot logs to 0x0.st..."
|
|
;;
|
|
|
|
installed)
|
|
# System info plus all installed packages
|
|
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
{
|
|
echo ""
|
|
echo "========================================="
|
|
echo "INSTALLED PACKAGES (pacman -Q)"
|
|
echo "========================================="
|
|
pacman -Q 2>/dev/null || echo "Failed to get package list"
|
|
} >>"$TEMP_LOG"
|
|
|
|
if [ ! -s "$TEMP_LOG" ]; then
|
|
echo "Error: Failed to gather system information"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Uploading system information to 0x0.st..."
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 [install|this-boot|last-boot|system-info]"
|
|
echo " install - Upload installation logs (default)"
|
|
echo " this-boot - Upload logs from current boot"
|
|
echo " last-boot - Upload logs from previous boot"
|
|
echo " installed - Upload system info and installed packages"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
echo ""
|
|
|
|
URL=$(curl -sF "file=@$TEMP_LOG" -Fexpires=24 https://0x0.st)
|
|
|
|
if [ $? -eq 0 ] && [ -n "$URL" ]; then
|
|
echo "✓ Log uploaded successfully!"
|
|
echo "Share this URL:"
|
|
echo ""
|
|
echo " $URL"
|
|
echo ""
|
|
echo "This link will expire in 24 hours."
|
|
else
|
|
echo "Error: Failed to upload log file"
|
|
exit 1
|
|
fi
|