summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-31 04:31:05 +0100
committerSam James <sam@gentoo.org>2021-06-20 22:46:32 +0100
commitf061657d17acbbd516699fe81a6de42851191b3c (patch)
tree04a6c93fe01841ee1aa60bad2e82af5d226c3f86 /eclass/user.eclass
parentuser.eclass: update _assert_pkg_ebuild_phase fatal error (diff)
downloadgentoo-f061657d17acbbd516699fe81a6de42851191b3c.tar.gz
gentoo-f061657d17acbbd516699fe81a6de42851191b3c.tar.bz2
gentoo-f061657d17acbbd516699fe81a6de42851191b3c.zip
user.eclass: change variable reference style for ${1}
For consistency with the rest of the eclass. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/user.eclass')
-rw-r--r--eclass/user.eclass38
1 files changed, 19 insertions, 19 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass
index 2d69da3a651f..c86ed53a11d0 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -89,8 +89,8 @@ enewuser() {
_assert_pkg_ebuild_phase ${FUNCNAME}
local create_home=1 force_uid=
- while [[ $1 == -* ]]; do
- case $1 in
+ while [[ ${1} == -* ]]; do
+ case ${1} in
-F) force_uid=1;;
-M) create_home=;;
*) die "${FUNCNAME}: invalid option ${1}";;
@@ -99,7 +99,7 @@ enewuser() {
done
# get the username
- local euser=$1; shift
+ local euser=${1}; shift
if [[ -z ${euser} ]] ; then
eerror "No username specified!"
die "Cannot call enewuser without a username"
@@ -115,7 +115,7 @@ enewuser() {
local opts=()
# handle uid
- local euid=$1; shift
+ local euid=${1}; shift
if [[ -n ${euid} && ${euid} != -1 ]] ; then
if [[ ${euid} -gt 0 ]] ; then
if [[ -n $(egetent passwd ${euid}) ]] ; then
@@ -140,7 +140,7 @@ enewuser() {
elog " - Userid: ${euid}"
# handle shell
- local eshell=$1; shift
+ local eshell=${1}; shift
if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then
if [[ ! -e ${ROOT}${eshell} ]] ; then
eerror "A shell was specified but it does not exist!"
@@ -157,7 +157,7 @@ enewuser() {
opts+=( -s "${eshell}" )
# handle homedir
- local ehome=$1; shift
+ local ehome=${1}; shift
if [[ -z ${ehome} ]] || [[ ${ehome} == "-1" ]] ; then
ehome="/dev/null"
fi
@@ -165,7 +165,7 @@ enewuser() {
opts+=( -d "${ehome}" )
# handle groups
- local egroups=$1; shift
+ local egroups=${1}; shift
local g egroups_arr
IFS="," read -r -a egroups_arr <<<"${egroups}"
if [[ ${#egroups_arr[@]} -gt 0 ]] ; then
@@ -244,8 +244,8 @@ enewgroup() {
_assert_pkg_ebuild_phase ${FUNCNAME}
local force_gid=
- while [[ $1 == -* ]]; do
- case $1 in
+ while [[ ${1} == -* ]]; do
+ case ${1} in
-F) force_gid=1;;
*) die "${FUNCNAME}: invalid option ${1}";;
esac
@@ -253,7 +253,7 @@ enewgroup() {
done
# get the group
- local egroup=$1; shift
+ local egroup=${1}; shift
if [[ -z ${egroup} ]] ; then
eerror "No group specified!"
die "Cannot call enewgroup without a group"
@@ -266,7 +266,7 @@ enewgroup() {
elog "Adding group '${egroup}' to your system ..."
# handle gid
- local egid=$1; shift
+ local egid=${1}; shift
if [[ -n ${egid} && ${egid} != -1 ]] ; then
if [[ ${egid} -gt 0 ]] ; then
if [[ -n $(egetent group ${egid}) ]] ; then
@@ -338,7 +338,7 @@ esethome() {
_assert_pkg_ebuild_phase ${FUNCNAME}
# get the username
- local euser=$1; shift
+ local euser=${1}; shift
if [[ -z ${euser} ]] ; then
eerror "No username specified!"
die "Cannot call esethome without a username"
@@ -351,7 +351,7 @@ esethome() {
fi
# handle homedir
- local ehome=$1; shift
+ local ehome=${1}; shift
if [[ -z ${ehome} ]] ; then
eerror "No home directory specified!"
die "Cannot call esethome without a home directory or '-1'"
@@ -407,7 +407,7 @@ esetshell() {
_assert_pkg_ebuild_phase ${FUNCNAME}
# get the username
- local euser=$1; shift
+ local euser=${1}; shift
if [[ -z ${euser} ]] ; then
eerror "No username specified!"
die "Cannot call esetshell without a username"
@@ -420,7 +420,7 @@ esetshell() {
fi
# handle shell
- local eshell=$1; shift
+ local eshell=${1}; shift
if [[ -z ${eshell} ]] ; then
eerror "No shell specified!"
die "Cannot call esetshell without a shell or '-1'"
@@ -467,7 +467,7 @@ esetcomment() {
_assert_pkg_ebuild_phase ${FUNCNAME}
# get the username
- local euser=$1; shift
+ local euser=${1}; shift
if [[ -z ${euser} ]] ; then
eerror "No username specified!"
die "Cannot call esetcomment without a username"
@@ -480,7 +480,7 @@ esetcomment() {
fi
# handle comment
- local ecomment=$1; shift
+ local ecomment=${1}; shift
if [[ -z ${ecomment} ]] ; then
eerror "No comment specified!"
die "Cannot call esetcomment without a comment"
@@ -526,7 +526,7 @@ esetgroups() {
[[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <user> <groups>"
# get the username
- local euser=$1; shift
+ local euser=${1}; shift
# lets see if the username already exists
if [[ -z $(egetent passwd "${euser}") ]] ; then
@@ -535,7 +535,7 @@ esetgroups() {
fi
# handle group
- local egroups=$1; shift
+ local egroups=${1}; shift
local g egroups_arr=()
IFS="," read -r -a egroups_arr <<<"${egroups}"