X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-instaweb.sh;h=6f91c8f845b2c4ef426a6451ac07abae2bce9488;hb=2a2ad0c0007b9f79768b4564644ac9eaaa7310b6;hp=ad0723ccc64cc2cb7d0e79a165a68707d3ddfde7;hpb=cab31fa076253fcfafa7572c24e40f12a1e09ae3;p=git.git diff --git a/git-instaweb.sh b/git-instaweb.sh index ad0723ccc..6f91c8f84 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -24,8 +24,6 @@ restart restart the web server fqgitdir="$GIT_DIR" local="`git config --bool --get instaweb.local`" httpd="`git config --get instaweb.httpd`" -browser="`git config --get instaweb.browser`" -test -z "$browser" && browser="`git config --get web.browser`" port=`git config --get instaweb.port` module_path="`git config --get instaweb.modulepath`" @@ -36,9 +34,6 @@ conf="$GIT_DIR/gitweb/httpd.conf" # if installed, it doesn't need further configuration (module_path) test -z "$httpd" && httpd='lighttpd -f' -# probably the most popular browser among gitweb users -test -z "$browser" && browser='firefox' - # any untaken local port will do... test -z "$port" && port=1234 @@ -276,4 +271,9 @@ esac start_httpd url=http://127.0.0.1:$port -test -n "$browser" && "$browser" $url || echo $url + +if test -n "$browser"; then + git web--browse -b "$browser" $url || echo $url +else + git web--browse -c "instaweb.browser" $url || echo $url +fi