Skip to content
Snippets Groups Projects
Commit c249de04 authored by Axel's avatar Axel
Browse files

ADDED: get_next_collisioner function in functions_common.sh

parent f1369468
No related branches found
No related tags found
No related merge requests found
......@@ -483,6 +483,27 @@ generic_package_manager_override() {
}
# - Description: Get another unique string using the first argument as current element. The first argument is to be
# expected as an integer, an empty string or nothing:
# - if is an integer: return next integer
# - if is empty string: return string "2"
# - if nothing: return empty string
# - Permission: Can be called as root or user.
# - Argument 1: Current anticollisioner number
get_next_collisioner()
{
if [ $# -eq 1 ]; then
echo ""
elif [ -z $1 ]; then
echo "2"
elif echo "$1" | grep -Eqo "[0-9]+"; then
echo "$((1 + $1))"
else
output_proxy_executioner "Unexpected input in get_next_collisioner(): $1" "ERROR"
fi
}
########################################################################################################################
############################################### COMMON MAIN FUNCTIONS ##################################################
########################################################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment