Add share commandline.

This commit is contained in:
Sebastian Bugge 2025-08-04 15:11:51 +02:00
parent 8bc4edfc75
commit b9d8ef023d
Signed by: kaholaz
GPG key ID: 2EFFEDEE03519691

14
.local/bin/share Executable file
View file

@ -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"