summaryrefslogtreecommitdiffstats
path: root/tempfs.sh
blob: dcc28675bd1fd7bec7ce7f41a6ae17d9a08a6a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
#----------------------------------------------------
# Version:      0.1.1
# Author:       Florian "Bluewind" Pritz <flo@xssn.at>
#
# Licensed under WTFPL v2
#   (see COPYING for full license text)
#
#----------------------------------------------------
# Upload file to tempfs and copy URL to cpulboard
#----------------------------------------------------

URL=$(curl -# -F userfile="@$1" -F 'expirationTime=5' -H "Expect: " http://www.tempfs.com/upload.php | grep -o 'http://.*/uploadedFiles/.*' | sed 's/<\/span>//')

echo -n $URL | nohup >/dev/null 2>&1 xclip
echo $URL