forked from p15670423/monkey
Build: Remove unnecessary assert_parameter_supplied()
This commit is contained in:
parent
7e039f73ff
commit
2a18e3e1bf
|
@ -77,15 +77,6 @@ user_exists() {
|
|||
id -u "$1" &>/dev/null
|
||||
}
|
||||
|
||||
# s/parameter/argument
|
||||
assert_parameter_supplied() {
|
||||
if [ -z "$2" ] ; then
|
||||
echo "Error: missing required parameter '$1'"
|
||||
echo_help
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
has_sudo() {
|
||||
# 0 true, 1 false
|
||||
sudo -nv > /dev/null 2>&1
|
||||
|
@ -152,8 +143,6 @@ if $do_uninstall ; then
|
|||
fi
|
||||
|
||||
if $do_install ; then
|
||||
assert_parameter_supplied "--user" "$username"
|
||||
|
||||
if ! user_exists "$username" ; then
|
||||
echo "Error: User '$username' does not exist"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue