dotfiles/.local/bin/share

14 lines
315 B
Bash
Executable file

#!/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/share "$1" >/dev/null
filename="${1##*/}"
echo "https://files.kaholaz.net/share/$filename"