From e4509312ab91ca80a32ac195c5e1e2b200112696 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 2 Jun 2025 01:00:20 +1200 Subject: [PATCH] 'Generic Commit' --- sos/sos | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sos/sos b/sos/sos index 3ae35aa..6e835df 100755 --- a/sos/sos +++ b/sos/sos @@ -1,13 +1,6 @@ #!/bin/bash set -euo pipefail -# sos upload - -# example: -# sos upload tools.dropshell.app file:latest ./file.txt - -# this will upload the file to the server, and return the download URL - # get dropshell TEMP_DIR=$(mktemp -d) @@ -74,7 +67,7 @@ function upload() { # upload the file - TARGET_URL="https://$server/upload" + TARGET_SERVER="https://$server" echo "Uploading $file to $TARGET_URL" DATETIME=$(datetime) @@ -84,6 +77,11 @@ function upload() { LABELTAGS_JSON=$(printf '"%s",' "${LABELTAGS[@]}") LABELTAGS_JSON="[${LABELTAGS_JSON%,}]" + # trip whitespace from the file path + LOCALHASH=$("${DROPSHELL}" hash "${file}" | tr -d '[:space:]') + echo "Local hash: $LOCALHASH" + + METADATA_JSON=$(cat <