Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Unreal Walking Test
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
Unreal Walking Test
Commits
aedb2ed8
Commit
aedb2ed8
authored
5 years ago
by
Simon Oehrl
Browse files
Options
Downloads
Patches
Plain Diff
Add/remove submodules
parent
4c654e4e
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
+38
-4
38 additions, 4 deletions
setup.sh
with
38 additions
and
4 deletions
setup.sh
+
38
−
4
View file @
aedb2ed8
...
...
@@ -194,15 +194,49 @@ function manage_plugins() {
clear
mkdir
-p
Plugins
cd
Plugins
echo
"Adding plugins..."
echo
"Adding/updating plugins..."
for
i
in
${
!plugins[@]
}
do
# Check if plugin is already present
repo_name_with_extension
=
${
plugin_repositories
[
$i
]##*/
}
repo_name
=
${
repo_name_with_extension
%*.git
}
path
=
$(
git config
-f
.gitmodules
--get
"submodule.Plugins/
${
repo_name
}
.path"
)
if
[
$?
-ne
0
]
then
plugin_present
=
true
else
plugin_present
=
false
fi
if
[
-n
"
${
plugin_branches
[
$i
]
}
"
]
then
echo
"
${
plugins
[
$i
]
}
"
if
[
"
$plugin_present
"
==
false
]
then
# Plugin was not yet added, call git submodule add
echo
"Add new plugin:
${
plugins
[
$i
]
}
"
git submodule add
-b
${
plugin_branches
[
$i
]
}
${
plugin_repositories
[
$i
]
}
else
# Updating existing plugin
echo
"Update plugin:
${
plugins
[
$i
]
}
"
cd
$repo_name
git fetch
git checkout
${
plugin_branches
[
$i
]
}
git pull
cd
..
fi
else
if
[
"
$plugin_present
"
==
true
]
then
# Remove plugin!
git submodule deinit
-f
"
$repo_name
"
git
rm
-f
"
$repo_name
"
git config
-f
../.gitmodules
--remove-section
"submodule.Plugins/
${
repo_name
}
"
if
[
-z
"
$(
cat
../.gitmodules
)
"
]
;
then
git
rm
-f
../.gitmodules
fi
fi
fi
done
cd
..
...
...
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