From: Svenne Krap Date: Sat, 30 Jun 2012 19:03:55 +0000 (+0200) Subject: allow profile name to be specified on command-line X-Git-Url: https://git.svenne.dk/?a=commitdiff_plain;h=24b4f75ef09a610777f1795282324ac8104bcd08;p=public%2Fmisc-sysadmin.git allow profile name to be specified on command-line --- diff --git a/save_firefox_urls.py b/save_firefox_urls.py index c28857e..e030ae3 100755 --- a/save_firefox_urls.py +++ b/save_firefox_urls.py @@ -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):