feat(audit): address batch 2 of missing scripts
- Implement nomarchy-version, nomarchy-debug, nomarchy-reinstall, nomarchy-rollback, nomarchy-upload-log - Implement nomarchy-refresh-hyprland and nomarchy-refresh-waybar - Update docs/SCRIPTS.md with 'kept' status for new scripts
This commit is contained in:
25
features/scripts/utils/nomarchy-upload-log
Executable file
25
features/scripts/utils/nomarchy-upload-log
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Nomarchy Log Upload Script
|
||||
# Uploads stdin or a file to a pastebin service.
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -t 0 ]] && [[ -z $1 ]]; then
|
||||
echo "Usage: some-command | nomarchy-upload-log"
|
||||
echo " nomarchy-upload-log <file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use ix.io as the default pastebin
|
||||
if [[ -n $1 ]]; then
|
||||
url=$(curl -F "f:1=@$1" ix.io)
|
||||
else
|
||||
url=$(curl -F "f:1=@-" ix.io)
|
||||
fi
|
||||
|
||||
echo "Log uploaded to: $url"
|
||||
if command -v wl-copy &>/dev/null; then
|
||||
echo "$url" | wl-copy
|
||||
echo "Link copied to clipboard."
|
||||
fi
|
||||
Reference in New Issue
Block a user