allow profile name to be specified on command-line
authorSvenne Krap <svenne@krap.dk>
Sat, 30 Jun 2012 19:03:55 +0000 (21:03 +0200)
committerSvenne Krap <svenne@krap.dk>
Sat, 30 Jun 2012 19:03:55 +0000 (21:03 +0200)
save_firefox_urls.py

index c28857ec29b2d9bd5a32e70470dd9013188d4359..e030ae3904a95850e4e30895a32ba3717264315c 100755 (executable)
@@ -17,7 +17,10 @@ import time
 
 ts = time.strftime("%Y-%m-%d-%H:%M:%S")
 
-profile = "default"
+if len(sys.argv) == 2:
+    profile = sys.argv[1]
+else:
+    profile = "default"
 basedir = os.environ['HOME'] + "/.mozilla/firefox/"
 histdir = os.environ['HOME'] + "/mozhistory";
 if not os.path.exists(histdir):