Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
L
Linux-Auto-Customizer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
Aleix Mariné-Tena
Linux-Auto-Customizer
Commits
c249de04
Commit
c249de04
authored
2 years ago
by
Axel
Browse files
Options
Downloads
Patches
Plain Diff
ADDED: get_next_collisioner function in functions_common.sh
parent
f1369468
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/functions_common.sh
+21
-0
21 additions, 0 deletions
src/core/functions_common.sh
with
21 additions
and
0 deletions
src/core/functions_common.sh
+
21
−
0
View file @
c249de04
...
...
@@ -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 ##################################################
########################################################################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment