#!/bin/bash #---------------------------------------------------- # Version: 0.1.1 # Author: Florian "Bluewind" Pritz # # 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