public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-p2p/azureus/files: azureus-3.0.5.2-pre
@ 2008-04-20 14:39 Petteri Raty (betelgeuse)
  0 siblings, 0 replies; only message in thread
From: Petteri Raty (betelgeuse) @ 2008-04-20 14:39 UTC (permalink / raw
  To: gentoo-commits

betelgeuse    08/04/20 14:39:08

  Added:                azureus-3.0.5.2-pre
  Log:
  Version bump.
  (Portage version: 2.1.5_rc3)

Revision  Changes    Path
1.1                  net-p2p/azureus/files/azureus-3.0.5.2-pre

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/azureus/files/azureus-3.0.5.2-pre?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/azureus/files/azureus-3.0.5.2-pre?rev=1.1&content-type=text/plain

Index: azureus-3.0.5.2-pre
===================================================================
#
# Copyright (c) 2005, Petteri Räty <betelgeuse@gentoo.org>
# Copyright (c) 2004, Jochen Maes <sejo@gentoo.org>
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
# Copyright (c) 2004, Gentoo Foundation
#
# Licensed under the GNU General Public License, v2

# The Azureus config dir has moved
olddotazudir="${HOME}/.Azureus"
oldgentoocfg="${olddotazudir}/gentoo.config"
dotazudir="${HOME}/.azureus"
gentoocfg="${dotazudir}/gentoo.config"

if [[ -f "${oldgentoocfg}" && -f "${gentoocfg}" ]]; then
	cat > /dev/stderr <<END
You have gentoo.config files in both 
${dotazudir} and
${olddotazudir}
${olddotazudir} is deprecated and you can delete this directory.

END
fi

create_initial_config() {
	if [[ ! -e "${dotazudir}" ]] ; then
		mkdir "${dotazudir}"
		echo "Creating ${dotazudir}" 
	fi

	[[ ${UI} ]] && UI="swt"

	echo "Creating ${gentoocfg}"

	# Create the config file
	cat > "${gentoocfg}" <<END
# User Interface options:
# console   - console based
# swt       - swt (GUI) based
UI="${UI}"

# Options you want to pass to the java binary
JAVA_OPTIONS=""
END
}

if [[ -f "${gentoocfg}" ]] ; then
	. "${gentoocfg}"
	echo "using ${gentoocfg}"
elif [[ -f "${oldgentoocfg}" ]]; then
	. "${oldgentoocfg}"
	echo "using ${oldgentoocfg}"
else
	create_initial_config
fi

if [[ -z "${UI}" && -n "${UI_OPTIONS}" ]]; then
	echo '${UI_OPTIONS} is no longer supported. ${UI} should be used instead instead' > /dev/stderr
	echo 'Unsetting ${UI_OPTIONS} and trying to migrate to ${UI}' > /dev/stderr
	if [[ ${UI_OPTIONS} = *--ui=console* ]]; then
		UI=console
	elif [[ ${UI_OPTIONS} = *--ui=swt* ]]; then
		UI=swt
	else
		echo 'Could not make $UI from $UI_OPTIONS' > /dev/stderr
	fi
	unset UI_OPTIONS
fi

if [[ -z "${UI}" ]]; then
	echo '$UI not set defaulting to swt' > /dev/stderr
	UI="swt"
fi

[[ ${UI} == swt ]] && UI=ui.swt
[[ ${UI} == console ]] && UI=cl

[[ ! -e "${dotazudir}" ]] && create_initial_config



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-20 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-20 14:39 [gentoo-commits] gentoo-x86 commit in net-p2p/azureus/files: azureus-3.0.5.2-pre Petteri Raty (betelgeuse)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox