scripts/up_share_file.sh

18 lines
337 B
Bash
Raw Normal View History

2024-11-14 10:55:59 +01:00
#!/usr/bin/bash
#
# usage: up_share_file.sh FILE [NAME]
exit_nofile()
{
echo "Give a file to upload";
exit 1;
}
test -f "$1" || exit_nofile
FILE="$1"
REMOTE=${2:-`basename "$FILE"`}
echo put "$FILE" "/home/masq/~masq/$REMOTE" | sftp -q masq@share.freepoteries.fr >/dev/null
echo "https://share.freepoteries.fr/~masq/$REMOTE"