From 54d90f3711abd0ad864fcb9767b27ca1f25541b2 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 11 Apr 2011 19:55:30 -0600 Subject: move src/uzbl-browser to bin/uzbl-browser --- Makefile | 4 +-- bin/uzbl-browser | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/uzbl-browser | 75 -------------------------------------------------------- 3 files changed, 77 insertions(+), 77 deletions(-) create mode 100755 bin/uzbl-browser delete mode 100755 src/uzbl-browser diff --git a/Makefile b/Makefile index 91b66b6..a3597df 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ test-uzbl-core: uzbl-core ./uzbl-core --uri http://www.uzbl.org --verbose test-uzbl-browser: uzbl-browser - ./src/uzbl-browser --uri http://www.uzbl.org --verbose + ./bin/uzbl-browser --uri http://www.uzbl.org --verbose test-uzbl-core-sandbox: uzbl-core make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-core @@ -134,7 +134,7 @@ install-uzbl-core: all install-dirs install -m755 uzbl-core $(INSTALLDIR)/bin/uzbl-core install-uzbl-browser: install-dirs - install -m755 src/uzbl-browser $(INSTALLDIR)/bin/uzbl-browser + install -m755 bin/uzbl-browser $(INSTALLDIR)/bin/uzbl-browser install -m755 examples/data/scripts/uzbl-event-manager $(INSTALLDIR)/bin/uzbl-event-manager mv $(INSTALLDIR)/bin/uzbl-browser $(INSTALLDIR)/bin/uzbl-browser.bak sed 's#^PREFIX=.*#PREFIX=$(RUN_PREFIX)#' < $(INSTALLDIR)/bin/uzbl-browser.bak > $(INSTALLDIR)/bin/uzbl-browser diff --git a/bin/uzbl-browser b/bin/uzbl-browser new file mode 100755 index 0000000..fb9a368 --- /dev/null +++ b/bin/uzbl-browser @@ -0,0 +1,75 @@ +#!/bin/sh +# +# This script implements a more useful out-of-the-box "browsing experience". +# It does so by combining uzbl-core with a set of "recommended" tools and +# practices. See docs for more info. +# +# If you want to customize the behavior any of the helper tools, copy them +# to your $XDG_DATA_HOME/uzbl/scripts/ and edit them + +PREFIX=/usr/local +export PREFIX + +EXAMPLES=$PREFIX/share/uzbl/examples + +XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} +export XDG_DATA_HOME + +XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} +export XDG_CACHE_HOME + +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} +export XDG_CONFIG_HOME + +# assure the relevant directories exist. +for dir in "$XDG_CACHE_HOME"/uzbl "$XDG_DATA_HOME"/uzbl "$XDG_CONFIG_HOME"/uzbl +do + if [ ! -d "$dir" ] + then + if ! mkdir -p "$dir" + then + echo "could not create $dir" >&2 + exit 2 + fi + fi +done + +# if no config exists yet in the recommended location, put the default (recommended) config there +if [ ! -f "$XDG_CONFIG_HOME"/uzbl/config ] +then + if [ ! -r "$EXAMPLES"/config/config ] + then + echo "Error: Global config not found; please check if your distribution ships them separately" + exit 3 + fi + if ! cp "$EXAMPLES"/config/* "$XDG_CONFIG_HOME"/uzbl/ + then + echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 + # Run with the global config as a last resort + config_file=$EXAMPLES/config/config + fi +fi + +# this variable is used by the default helper scripts as a location to +# load shared code from +if [ -z "$UZBL_UTIL_DIR" ] +then + if [ -d "$XDG_DATA_HOME"/uzbl/scripts/util ] + then + UZBL_UTIL_DIR=$XDG_DATA_HOME/uzbl/scripts/util + elif [ -d $EXAMPLES/data/scripts/util ] + then + UZBL_UTIL_DIR=$EXAMPLES/data/scripts/util + fi + export UZBL_UTIL_DIR +fi + +# uzbl-event-manager will exit if one is already running. +# we could also check if its pid file exists to avoid having to spawn it. +DAEMON_SOCKET="$XDG_CACHE_HOME"/uzbl/event_daemon +#if [ ! -f "$DAEMON_SOCKET".pid ] +#then + ${UZBL_EVENT_MANAGER:-uzbl-event-manager -va start} +#fi + +exec uzbl-core "$@" ${config_file:+--config "$config_file"} --connect-socket $DAEMON_SOCKET diff --git a/src/uzbl-browser b/src/uzbl-browser deleted file mode 100755 index fb9a368..0000000 --- a/src/uzbl-browser +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# -# This script implements a more useful out-of-the-box "browsing experience". -# It does so by combining uzbl-core with a set of "recommended" tools and -# practices. See docs for more info. -# -# If you want to customize the behavior any of the helper tools, copy them -# to your $XDG_DATA_HOME/uzbl/scripts/ and edit them - -PREFIX=/usr/local -export PREFIX - -EXAMPLES=$PREFIX/share/uzbl/examples - -XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} -export XDG_DATA_HOME - -XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} -export XDG_CACHE_HOME - -XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} -export XDG_CONFIG_HOME - -# assure the relevant directories exist. -for dir in "$XDG_CACHE_HOME"/uzbl "$XDG_DATA_HOME"/uzbl "$XDG_CONFIG_HOME"/uzbl -do - if [ ! -d "$dir" ] - then - if ! mkdir -p "$dir" - then - echo "could not create $dir" >&2 - exit 2 - fi - fi -done - -# if no config exists yet in the recommended location, put the default (recommended) config there -if [ ! -f "$XDG_CONFIG_HOME"/uzbl/config ] -then - if [ ! -r "$EXAMPLES"/config/config ] - then - echo "Error: Global config not found; please check if your distribution ships them separately" - exit 3 - fi - if ! cp "$EXAMPLES"/config/* "$XDG_CONFIG_HOME"/uzbl/ - then - echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 - # Run with the global config as a last resort - config_file=$EXAMPLES/config/config - fi -fi - -# this variable is used by the default helper scripts as a location to -# load shared code from -if [ -z "$UZBL_UTIL_DIR" ] -then - if [ -d "$XDG_DATA_HOME"/uzbl/scripts/util ] - then - UZBL_UTIL_DIR=$XDG_DATA_HOME/uzbl/scripts/util - elif [ -d $EXAMPLES/data/scripts/util ] - then - UZBL_UTIL_DIR=$EXAMPLES/data/scripts/util - fi - export UZBL_UTIL_DIR -fi - -# uzbl-event-manager will exit if one is already running. -# we could also check if its pid file exists to avoid having to spawn it. -DAEMON_SOCKET="$XDG_CACHE_HOME"/uzbl/event_daemon -#if [ ! -f "$DAEMON_SOCKET".pid ] -#then - ${UZBL_EVENT_MANAGER:-uzbl-event-manager -va start} -#fi - -exec uzbl-core "$@" ${config_file:+--config "$config_file"} --connect-socket $DAEMON_SOCKET -- cgit v1.2.3