From fdf038fddf458702d670ad204eba769b41b10903 Mon Sep 17 00:00:00 2001 From: Yaohan Chen Date: Tue, 1 Apr 2014 12:58:14 -0400 Subject: Add an option to turn on logging --- README | 2 +- hib-dlagent | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index 012839e..4aad4b4 100644 --- a/README +++ b/README @@ -46,7 +46,7 @@ Troubleshooting Extracting URLs from Humble Bundle's mostly dynamically-generated website can be error-prone, and time consuming. Currently it can take about 20 seconds for the script to run. If the script fails or gets stuck, it may help to turn on logging -by setting the LOG environment variable to a non-empty value. +by with the -l option. It is also possible to turn on PhantomJS's debug output with '-j --debug=true', but note that this output is very verbose and targeted to developers, and it may diff --git a/hib-dlagent b/hib-dlagent index 9dda7dd..79c406d 100755 --- a/hib-dlagent +++ b/hib-dlagent @@ -45,6 +45,7 @@ Options: -S Directory where PhantomJS scripts are located. -c Directory where configuration files are located. -j Additional options passed to PhantomJS + -l Turn on logging If you specify -u, then all of that account's bundles are searched. If a key is associated with a HIB account then you must use -u/-p, since that key only works @@ -99,7 +100,7 @@ main() { exit 1 fi - while getopts "hd:k:o:p:P:su:S:c:j:" opt; do + while getopts "hd:k:o:p:P:su:S:c:j:l" opt; do case $opt in \?) exit 1 @@ -138,6 +139,9 @@ main() { j) PHANTOM_JS_OPTIONS="$OPTARG" ;; + l) + export LOG=1 + ;; esac done -- cgit v1.2.3-70-g09d2