diff bin/url @ 1813:d5b2eb52c760

<oerjan> cat url >bin/url
author HackBot
date Fri, 25 Jan 2013 20:38:02 +0000
parents e037173e0012
children 28b402caecb0
line wrap: on
line diff
--- a/bin/url	Fri Jan 25 20:37:44 2013 +0000
+++ b/bin/url	Fri Jan 25 20:38:02 2013 +0000
@@ -1,7 +1,6 @@
-#!/bin/bash
-if [ "$1" ]
-then
-    echo 'http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/'"$1"
-else
-    echo 'http://codu.org/projects/hackbot/fshg/'
-fi
\ No newline at end of file
+#!/usr/bin/env python
+import sys, urllib
+arg = sys.argv(1)
+if arg == None: print "http://codu.org/projects/hackbot/fshg/"
+else: print urllib.quote(
+    "http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/" . arg)