summaryrefslogtreecommitdiffstats
path: root/tempfs.sh
blob: fd7401effe7db8fbb1118e129d9679d92693f1f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#----------------------------------------------------
# Version:      0.1.1
# Author:       Florian "Bluewind" Pritz <f-p@gmx.at>
#
# Copyright (C) 2009 Florian Pritz
#
# Licensed under GNU General Public License v3
#   (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