summaryrefslogtreecommitdiffstats
path: root/tools/upload2blip
diff options
context:
space:
mode:
Diffstat (limited to 'tools/upload2blip')
-rwxr-xr-xtools/upload2blip20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/upload2blip b/tools/upload2blip
new file mode 100755
index 0000000..9a15c77
--- /dev/null
+++ b/tools/upload2blip
@@ -0,0 +1,20 @@
+#!/bin/bash
+# todo: maks 1gb og riktige formater!
+# bruk REST-api i steden for ftp!
+
+EXT=`echo "$1"|awk -F . '{print $NF}'`
+BASENAME=`basename $1 .$EXT`
+
+USERNAME=`grep username blip|awk '{print $3}'`
+PASSWORD=`grep password blip|awk '{print $3}'`
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <filename>"
+ exit 1
+fi
+
+./require curl || { exit 1; }
+
+echo -n " * Uploading $1 to blip.tv..."
+curl -T $1 --silent --user $USERNAME:$PASSWORD ftp://ftp.blip.tv/
+echo -e "OK!"