Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tiled Display Video
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Tiled Display Video
Commits
ada5cf8e
Commit
ada5cf8e
authored
5 years ago
by
Simon Oehrl
Browse files
Options
Downloads
Patches
Plain Diff
Improve main menu
parent
57566b56
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.sh
+19
-12
19 additions, 12 deletions
setup.sh
with
19 additions
and
12 deletions
setup.sh
+
19
−
12
View file @
ada5cf8e
...
@@ -41,7 +41,7 @@ function initial_setup() {
...
@@ -41,7 +41,7 @@ function initial_setup() {
git checkout master
git checkout master
git push
-u
origin master
git push
-u
origin master
git checkout develop
git checkout develop
#
fi
fi
echo
"Done!"
echo
"Done!"
echo
"Press [enter] to select plugins."
echo
"Press [enter] to select plugins."
read
x
read
x
...
@@ -251,8 +251,9 @@ function manage_plugins() {
...
@@ -251,8 +251,9 @@ function manage_plugins() {
function
show_main_menu
()
{
function
show_main_menu
()
{
selection
=
0
selection
=
0
exit
=
false
exit
=
false
quit
=
false
while
[
$exit
=
false
]
while
[
"
$exit
"
=
=
false
]
do
do
clear
clear
...
@@ -281,27 +282,33 @@ function show_main_menu() {
...
@@ -281,27 +282,33 @@ function show_main_menu() {
echo
""
echo
""
echo
"[Arrow Up/Down] Change Selection"
echo
"[Arrow Up/Down] Change Selection"
echo
"[Enter] Select"
echo
"[Enter] Select"
echo
"[Esc] Quit"
IFS
=
''
IFS
=
''
escape_char
=
$(
printf
"
\u
1b"
)
escape_char
=
$(
printf
"
\u
1b"
)
escape
=
false
read
-rsn1
mode
# get 1 character
read
-rsn1
mode
# get 1 character
if
[[
$mode
==
$escape_char
]]
;
then
if
[[
$mode
==
$escape_char
]]
;
then
read
-rsn2
mode
# read 2 more chars
escape
=
true
read
-rsn2
-t
0.1 mode
# read 2 more chars
fi
fi
case
$mode
in
case
$mode
in
""
)
exit
=
true
;;
""
)
if
[
"
$escape
"
=
true
]
;
then
quit
=
true
;
fi
;
exit
=
true
;;
"[A"
)
if
[
"
$selection
"
-gt
"0"
]
;
then
let
selection-
=
1
;
fi
;;
"[A"
)
if
[
"
$selection
"
-gt
"0"
]
;
then
let
selection-
=
1
;
fi
;;
"[B"
)
if
[
"
$selection
"
-lt
"
3
"
]
;
then
let
selection+
=
1
;
fi
;;
"[B"
)
if
[
"
$selection
"
-lt
"
2
"
]
;
then
let
selection+
=
1
;
fi
;;
*
)
>
&2
;;
*
)
>
&2
;;
esac
esac
done
done
if
[
"
$escape
"
==
false
]
then
case
$selection
in
case
$selection
in
0
)
initial_setup
;
show_main_menu
;;
0
)
initial_setup
;
show_main_menu
;;
1
)
manage_plugins
;
show_main_menu
;;
1
)
manage_plugins
;
show_main_menu
;;
2
)
;;
2
)
;;
*
)
>
&2
;;
*
)
>
&2
;;
esac
esac
fi
}
}
show_main_menu
show_main_menu
\ No newline at end of file
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