diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2012-03-19 12:57:43 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2012-03-19 12:57:43 +0000 |
commit | 64cc4a88da8887ef1f7f4d90be0158d2cc76222d (patch) | |
tree | e72af709fbce8bc495f51e7f0518de9a9a2c3b7f /src/webhttrack | |
parent | 844ecc37072d515513177c65a8c9dc35c9cdfc1a (diff) |
httrack 3.40.4
Diffstat (limited to 'src/webhttrack')
-rwxr-xr-x | src/webhttrack | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/webhttrack b/src/webhttrack index ca3f512..aa0edca 100755 --- a/src/webhttrack +++ b/src/webhttrack @@ -59,8 +59,9 @@ fi # -remote if needed. Change the URL into openURL($url) too. # (thanks to Torsten Werner for the patch) # see http://www.mozilla.org/unix/remote.html +# 04/2006: openurl() fix from Samuel Suther if mozillabrowser ${browser}; then - if ! ${browser} -remote "${url}"; then + if ! ${browser} -remote "openurl(${url})"; then log "spawning browser.." ${browser} "${url}" fi @@ -129,7 +130,18 @@ test -n "$BROWSEREXE" || ! log "cound not find any suitable browser" || exit 1 # "browse" command if test "$1" = "browse"; then -launch_browser "${BROWSEREXE}" "file://${HOME}/websites/index.html" +if test -f "${HOME}/.httrack.ini"; then +INDEXF=`cat ${HOME}/.httrack.ini | tr '\r' '\n' | grep -E "^path=" | cut -f2- -d'='` +if test -n "${INDEXF}" -a -d "${INDEXF}" -a -f "${INDEXF}/index.html"; then +INDEXF="${INDEXF}/index.html" +else +INDEXF="" +fi +fi +if ! test -n "$INDEXF"; then +INDEXF="${HOME}/websites/index.html" +fi +launch_browser "${BROWSEREXE}" "file://${INDEXF}" exit $? fi |