From 688b28a5f7243160f9e87d67f4584bf5951d5e22 Mon Sep 17 00:00:00 2001 From: clsty Date: Tue, 18 Feb 2025 10:01:56 +0800 Subject: [PATCH] Add optional diagnose uploader --- diagnose | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/diagnose b/diagnose index 1511241ea..8ff9bcef2 100755 --- a/diagnose +++ b/diagnose @@ -74,3 +74,13 @@ x ags --version x agsv1 --version e "Finished. Output saved as \"$output_file\"." +if ! command -v curl 2>&1 >>/dev/null ;then echo "\"curl\" not found, pastebin upload unavailable.";exit;fi +echo "(Optional) Do you agree to upload the file \"$output_file\" to the online pastebin (https://0x0.st)? (y/N)" +read -p "====> " p +case $p in + [yY]) echo "OK, uploading..." + curl -F'file=@diagnose.result' https://0x0.st && \ + echo "Uploaded. Please attach the URL above when asking for help." + ;; + *) echo "Uploading aborted.";; +esac