public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/eselect:master commit in: modules/
@ 2012-08-19 20:03 Ulrich Mueller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller @ 2012-08-19 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     4975ec6a0a6ddc9ca63b7eb01c76302ad2d7c2a1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 27 20:39:40 2012 +0000
Commit:     Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun 27 20:39:40 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=4975ec6a

Declare local variables.

---
 modules/binutils.eselect |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/binutils.eselect b/modules/binutils.eselect
index 8694bd5..fe79723 100644
--- a/modules/binutils.eselect
+++ b/modules/binutils.eselect
@@ -12,7 +12,9 @@ BINUTILS_ENVFILE=${EROOT}/etc/env.d/05binutils
 # find_targets [patterns]
 # find all possible targets [that match one of ${@}]
 find_targets() {
-	local item targets
+	local item file
+	local -a targets
+
 	[[ $# -eq 0 ]] && set -- "-*"
 	for item; do
 		item=${item%%-[1-9]*}
@@ -28,8 +30,9 @@ find_targets() {
 # find_versions
 # find all installed version of installed binutils
 find_versions() {
+	local target file last_versions_count
 	local -a versions
-	local last_versions_count
+
 	for target in $(find_targets) ; do
 		last_version_count=${#versions[@]}
 		for file in "${EROOT}"/etc/env.d/binutils/${target}-* ; do
@@ -45,6 +48,7 @@ find_versions() {
 # is_active $target $version
 # returns true if $version is currently used
 is_active() {
+	local current
 	[[ ${#@} -eq 2 ]] || die "Need exactly 2 arguments!"
 	current=$(load_config "${EROOT}/etc/env.d/binutils/config-${1}" CURRENT)
 	[[ ${current} == ${2} ]]


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/eselect:master commit in: modules/
@ 2012-09-12 22:21 Ulrich Mueller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller @ 2012-09-12 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     7f58b5027367ef5978f4b035736bdbc431680eb7
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 12 22:20:35 2012 +0000
Commit:     Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 12 22:20:35 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=7f58b502

Fix warning message in profile module.

---
 modules/profile.eselect |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/profile.eselect b/modules/profile.eselect
index 39794d9..5adccd1 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -19,7 +19,7 @@ get_symlink_location() {
 	if [[ -e ${oldloc} ]]; then
 		if [[ -e ${newloc} ]]; then
 			write_warning_msg "Both ${oldloc} and ${newloc} exist."
-			write_warning_msg "Using ${MAKE_PROFILE} for now."
+			write_warning_msg "Using ${MAKE_PROFILE}."
 		else
 			MAKE_PROFILE=${oldloc}
 		fi


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/eselect:master commit in: modules/
@ 2015-01-18 22:01 Ulrich Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2015-01-18 22:01 UTC (permalink / raw
  To: gentoo-commits

commit:     67d78f61f927c6e91d3b37a9f3f1cf28eed44839
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 18 22:06:48 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 18 22:06:48 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=67d78f61

Clean up coding style in rc module.

---
 modules/rc.eselect | 58 +++++++++++++++++++++++-------------------------------
 1 file changed, 25 insertions(+), 33 deletions(-)

diff --git a/modules/rc.eselect b/modules/rc.eselect
index c568a13..03c0af3 100644
--- a/modules/rc.eselect
+++ b/modules/rc.eselect
@@ -22,9 +22,8 @@ get_runlevel() {
 list_runlevels() {
 	[[ $# -eq 1 ]] || return
 	local x runlevels
-	for x in "${EROOT}"/etc/runlevels/* ; do
-		[[ -d ${x} && -L ${x}/${1} ]] \
-			&& runlevels=(${runlevels[@]} "${x##*/}")
+	for x in "${EROOT}"/etc/runlevels/*; do
+		[[ -d ${x} && -L ${x}/$1 ]] && runlevels=(${runlevels[@]} "${x##*/}")
 	done
 	echo -ne "${runlevels[@]}"
 }
@@ -44,8 +43,8 @@ is_script() {
 # find_scripts PRIVATE
 # browse directory $1 for init scripts and return a list
 find_scripts() {
-	for file in ${1}/* ; do
-		is_script ${file} && echo "${file##*/}"
+	for file in $1/*; do
+		is_script "${file}" && echo "${file##*/}"
 	done
 }
 
@@ -64,7 +63,7 @@ find_unused_scripts() {
 # show_script_status PRIVATE
 # output list entry for script $1 and show its status
 show_script_status() {
-	local script=${1} status=unknown x
+	local script=$1 status=unknown x
 	local PATH=/lib/rc/bin:${PATH} # path to service_* commands
 
 	for x in stopping starting inactive started stopped; do
@@ -89,7 +88,7 @@ show_script_status() {
 # run_runscript PRIVATE
 # run RC_RUNSCRIPT with script $2- and command $1
 run_runscript() {
-	local command=${1}
+	local command=$1
 	shift
 	for script; do
 		is_script "${EROOT}/etc/init.d/${script}" \
@@ -113,20 +112,19 @@ describe_add_options() {
 }
 
 do_add() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be added!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be added!"
 	local script=${1##*/}
 	[[ -e ${EROOT}/etc/init.d/${script} ]] \
 		|| die -q "Please specify a valid init script!"
 	shift 1
 	local runlevels=${@:-default}
 	write_list_start "Adding $(highlight ${script}) to following runlevels"
-	for runlevel in ${runlevels} ; do
-		if [[ ! -d ${EROOT}/etc/runlevels/${runlevel} ]] ; then
+	for runlevel in ${runlevels}; do
+		if [[ ! -d ${EROOT}/etc/runlevels/${runlevel} ]]; then
 			write_kv_list_entry ${runlevel} "[invalid]"
 			continue
 		else
-			if [[ -L ${EROOT}/etc/runlevels/${runlevel}/${script} ]] ; then
+			if [[ -L ${EROOT}/etc/runlevels/${runlevel}/${script} ]]; then
 				write_kv_list_entry ${runlevel} "[skipped]"
 			else
 				ln -sf \
@@ -155,20 +153,19 @@ describe_delete_options() {
 }
 
 do_delete() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be deleted!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be deleted!"
 	local script=${1##*/}
 	shift 1
 	[[ -e ${EROOT}/etc/init.d/${script} ]] || write_warning_msg \
 		"Init script not found in ${EROOT}/etc/init.d/. Continuing anyway."
 	local runlevels=${@:-default}
 	write_list_start "Deleting $(highlight ${script}) from following runlevels"
-	for runlevel  in ${runlevels} ; do
-		if [[ ! -d ${EROOT}/etc/runlevels/${runlevel} ]] ; then
+	for runlevel in ${runlevels}; do
+		if [[ ! -d ${EROOT}/etc/runlevels/${runlevel} ]]; then
 			write_kv_list_entry ${runlevel} "[invalid]"
 			continue
 		else
-			if [[ -L ${EROOT}/etc/runlevels/${runlevel}/${script} ]] ; then
+			if [[ -L ${EROOT}/etc/runlevels/${runlevel}/${script} ]]; then
 				rm "${EROOT}/etc/runlevels/${runlevel}/${script}" \
 					&& write_kv_list_entry ${runlevel} "[done]" \
 					|| write_kv_list_entry ${runlevel} "[failed]"
@@ -195,18 +192,18 @@ describe_list_options() {
 
 do_list() {
 	local dir file item
-	if [[ -n ${1} ]] && [[ -d ${EROOT}/etc/runlevels/${1} ]] ; then
-		dir=${EROOT}/etc/runlevels/${1}
+	if [[ -n $1 ]] && [[ -d ${EROOT}/etc/runlevels/$1 ]]; then
+		dir=${EROOT}/etc/runlevels/$1
 		write_list_start \
-			"Init scripts to be started by runlevel $(highlight ${1})"
-	elif [[ -z ${1} ]] ; then
+			"Init scripts to be started by runlevel $(highlight $1)"
+	elif [[ -z $1 ]]; then
 		dir=${EROOT}/etc/init.d
 		write_list_start "Available init scripts"
 	else
-		die -q "${1} is no valid runlevel!"
+		die -q "$1 is no valid runlevel!"
 	fi
 
-	for file in $(find_scripts "${dir}") ; do
+	for file in $(find_scripts "${dir}"); do
 		write_kv_list_entry "${file}" \
 			$([[ ${dir##*/} = init.d ]] && list_runlevels "${file}")
 	done
@@ -290,8 +287,7 @@ describe_start_options() {
 }
 
 do_start() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be started!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be started!"
 	write_list_start "Starting init script$([[ $# -gt 1 ]] && echo -n 's')"
 	run_runscript start "$@"
 }
@@ -311,8 +307,7 @@ describe_stop_options() {
 }
 
 do_stop() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be stopped!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be stopped!"
 	write_list_start "Stopping init script$([[ $# -gt 1 ]] && echo -n 's')"
 	run_runscript stop "$@"
 }
@@ -332,8 +327,7 @@ describe_pause_options() {
 }
 
 do_pause() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be paused!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be paused!"
 	write_list_start "Pausing init script$([[ $# -gt 1 ]] && echo -n 's')"
 	run_runscript pause "$@"
 }
@@ -353,8 +347,7 @@ describe_reload_options() {
 }
 
 do_reload() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be reloaded!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be reloaded!"
 	write_list_start "Reloading init script$([[ $# -gt 1 ]] && echo -n 's')"
 	run_runscript reload "$@"
 }
@@ -374,8 +367,7 @@ describe_restart_options() {
 }
 
 do_restart() {
-	[[ $# -gt 0 ]] \
-		|| die -q "Please specify the init script to be restarted!"
+	[[ $# -gt 0 ]] || die -q "Please specify the init script to be restarted!"
 	write_list_start "Restarting init script$([[ $# -gt 1 ]] && echo -n 's')"
 	run_runscript restart "$@"
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/eselect:master commit in: modules/
@ 2023-07-01 14:49 Ulrich Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2023-07-01 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     35f7c112e5a0ee16e680e6ed7321b88332b86450
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 12 17:34:59 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 17:34:59 2023 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=35f7c112

env.eselect: Fix typos in comments

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 modules/env.eselect | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/env.eselect b/modules/env.eselect
index 7161e10..21369d2 100644
--- a/modules/env.eselect
+++ b/modules/env.eselect
@@ -36,8 +36,8 @@ PRELINK="${EROOT}/etc/prelink.conf"
 # Keep all stored LDPATHS
 ESELECT_LDPATH=( )
 
-# is_envd_file()
-# Return successfuly when file can be sourced.
+# is_envfile()
+# Return successfully when file can be sourced.
 is_envfile() {
 	local mime envfile=${1}
 
@@ -58,7 +58,7 @@ is_envfile() {
 }
 
 # update_envvar_classes()
-# Update the contents of *_CLASS based on env,d files.
+# Update the contents of *_CLASS based on env.d files.
 update_envvar_classes() {
 	local -a envfiles
 	local value


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-01 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 22:21 [gentoo-commits] proj/eselect:master commit in: modules/ Ulrich Mueller
  -- strict thread matches above, loose matches on Subject: below --
2023-07-01 14:49 Ulrich Müller
2015-01-18 22:01 Ulrich Müller
2012-08-19 20:03 Ulrich Mueller

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