diff --git a/builder/cmds/autostart-offline.sh b/builder/cmds/autostart-offline.sh index d4174d8..677f748 100644 --- a/builder/cmds/autostart-offline.sh +++ b/builder/cmds/autostart-offline.sh @@ -96,6 +96,11 @@ EOF mkdir -p /mnt/home/$OMARCHY_USER/.local/share/applications/icons cp -r /root/.local/share/applications/icons/* /mnt/home/$OMARCHY_USER/.local/share/applications/icons/ + # Copy the log upload utility to the installed system + mkdir -p /mnt/usr/local/bin + cp /usr/local/bin/omarchy-upload-install-log /mnt/usr/local/bin/ + chmod +x /mnt/usr/local/bin/omarchy-upload-install-log + chown -R 1000:1000 /mnt/home/$OMARCHY_USER/.local/ # Ensure all scripts in bin directories are executable find /mnt/home/$OMARCHY_USER/.local/share/omarchy -type f -path "*/bin/*" -exec chmod +x {} \; diff --git a/builder/cmds/omarchy-upload-install-log b/builder/cmds/omarchy-upload-install-log new file mode 100644 index 0000000..a3a6d48 --- /dev/null +++ b/builder/cmds/omarchy-upload-install-log @@ -0,0 +1,30 @@ +#!/bin/bash + +# Upload Omarchy install log to 0x0.st + +LOG_FILE="/var/log/omarchy-install.log" + +if [ ! -f "$LOG_FILE" ]; then + echo "Error: Install log not found at $LOG_FILE" + exit 1 +fi + +echo "Uploading Omarchy install log to 0x0.st..." +echo "The log will expire in 24 hours." +echo "" + +# Upload the file and capture the URL +URL=$(curl -sF "file=@$LOG_FILE" -Fexpires=24 https://0x0.st) + +if [ $? -eq 0 ] && [ -n "$URL" ]; then + echo "✓ Log uploaded successfully!" + echo "Share this URL with support:" + echo "" + echo " $URL" + echo "" + echo "This link will expire in 24 hours." +else + echo "Error: Failed to upload log file" + exit 1 +fi + diff --git a/builder/offline.sh b/builder/offline.sh index 3103f32..cf582df 100755 --- a/builder/offline.sh +++ b/builder/offline.sh @@ -130,6 +130,11 @@ cp /builder/icons/*.png "$cache_dir/airootfs/root/.local/share/applications/icon # Copy the autostart script (we'll need to create an offline version) cp /builder/cmds/autostart-offline.sh $cache_dir/airootfs/root/.automated_script.sh +# Copy the log upload utility to /usr/local/bin +mkdir -p "$cache_dir/airootfs/usr/local/bin" +cp /builder/cmds/omarchy-upload-install-log "$cache_dir/airootfs/usr/local/bin/" +chmod +x "$cache_dir/airootfs/usr/local/bin/omarchy-upload-install-log" + # Apply offline-specific patches (cd $cache_dir/ && git apply /builder/patches/offline/permissions.patch)