Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
c9f8427e
Commit
c9f8427e
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Choosing a variant
parent
5025c5c2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-config
+7
-7
7 additions, 7 deletions
src/freedombone-config
src/freedombone-utils-selector
+4
-3
4 additions, 3 deletions
src/freedombone-utils-selector
with
11 additions
and
10 deletions
src/freedombone-config
+
7
−
7
View file @
c9f8427e
...
@@ -773,11 +773,10 @@ function choose_full_name {
...
@@ -773,11 +773,10 @@ function choose_full_name {
function
choose_system_variant
{
function
choose_system_variant
{
available_variants_list
=()
available_variants_list
=()
variants_list
=
$(
available_system_variants
)
available_system_variants
varslist
=
""
varslist
=
""
n
=
1
n
=
1
vars_index
=
0
for
a
in
"
${
available_variants_list
[@]
}
"
for
a
in
"
${
available_variants_list
[@]
}
"
do
do
varstate
=
'off'
varstate
=
'off'
...
@@ -786,17 +785,18 @@ function choose_system_variant {
...
@@ -786,17 +785,18 @@ function choose_system_variant {
fi
fi
varslist
=
"
$varslist
$n
$a
$varstate
"
varslist
=
"
$varslist
$n
$a
$varstate
"
n
=
$[
n+1]
n
=
$[
n+1]
vars_index
=
$[
vars_index+1]
done
done
variant_choice
=
$(
dialog
--stdout
--backtitle
$"Freedombone Configuration"
\
variant_choice
=
$(
dialog
--stdout
--backtitle
$"Freedombone Configuration"
\
--title
$"Type of Installation"
\
--title
$"Type of Installation"
\
--radiolist
$'Choose:'
\
--radiolist
$'Choose:'
\
27 40 20
$varslist
)
27 40 20
$varslist
)
variant_choice
=
$((
variant_choice
-
1
))
export
SYSTEM_TYPE
=
${
variants_list
[
$variant_choice
]
}
if
[
$?
-eq
0
]
;
then
save_configuration_values
variant_choice
=
$[
variant_choice-1]
write_config_param
"SYSTEM_TYPE"
"
$SYSTEM_TYPE
"
SYSTEM_TYPE
=
${
available_variants_list
[
$variant_choice
]
}
save_configuration_values
fi
}
}
function
validate_freedns_code
{
function
validate_freedns_code
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-selector
+
4
−
3
View file @
c9f8427e
...
@@ -99,19 +99,20 @@ function item_in_array {
...
@@ -99,19 +99,20 @@ function item_in_array {
function
available_system_variants
{
function
available_system_variants
{
FILES
=
/usr/share/
${
PROJECT_NAME
}
/apps/
${
PROJECT_NAME
}
-app-
*
FILES
=
/usr/share/
${
PROJECT_NAME
}
/apps/
${
PROJECT_NAME
}
-app-
*
available_variants_list
=()
new_
available_variants_list
=()
for
filename
in
$FILES
for
filename
in
$FILES
do
do
system_variants_list
=
$(
app_variants
$filename
)
system_variants_list
=
$(
app_variants
$filename
)
variants_array
=(
$system_variants_list
)
variants_array
=(
$system_variants_list
)
for
variant_str
in
"
${
variants_array
[@]
}
"
for
variant_str
in
"
${
variants_array
[@]
}
"
do
do
item_in_array
"
${
variant_str
}
"
"
${
available_variants_list
[@]
}
"
item_in_array
"
${
variant_str
}
"
"
${
new_
available_variants_list
[@]
}
"
if
[[
$?
!=
0
]]
;
then
if
[[
$?
!=
0
]]
;
then
available_variants_list+
=(
"
$variant_str
"
)
new_
available_variants_list+
=(
"
$variant_str
"
)
fi
fi
done
done
done
done
available_variants_list
=(
$(
sort
<<<
"
${
new_available_variants_list
[*]
}
"
)
)
}
}
function
is_valid_variant
{
function
is_valid_variant
{
...
...
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