From b9d8ef023de1af96f115f6c8650c567a93f90aff Mon Sep 17 00:00:00 2001 From: Sebastian Bugge Date: Mon, 4 Aug 2025 15:11:51 +0200 Subject: [PATCH] Add share commandline. --- .local/bin/share | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .local/bin/share diff --git a/.local/bin/share b/.local/bin/share new file mode 100755 index 0000000..e5cbab0 --- /dev/null +++ b/.local/bin/share @@ -0,0 +1,14 @@ +#!/bin/bash + +set -euo pipefail + +password=$(cat .config/copyparty/password 2>/dev/null || echo '') +if [ -z "$password" ]; then + echo -n 'Password: ' + read -s password + echo +fi + +u2c -a "$password" https://files.kaholaz.net/pub "$1" >/dev/null +filename="${1##*/}" +echo "https://files.kaholaz.net/pub/$filename"