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
c29e5554
Commit
c29e5554
authored
5 years ago
by
Simon Oehrl
Browse files
Options
Downloads
Patches
Plain Diff
Delete update.sh
parent
04ad4a4f
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
update.sh
+0
-46
0 additions, 46 deletions
update.sh
with
0 additions
and
46 deletions
update.sh
deleted
100644 → 0
+
0
−
46
View file @
04ad4a4f
#!/bin/sh
if
[
!
-f
"update.txt"
]
then
echo
"The file update.txt does not exists."
echo
"Make sure setup.sh has been run and the file is checked in into git."
exit
-1
fi
readarray
-n
2
-t
update < update.txt
remote
=
${
update
[0]
}
branch
=
${
update
[1]
}
template_remote
=
$(
git remote |
grep
template-origin
)
if
[
-z
"
$template_remote
"
]
then
echo
"Add remote for the template."
git remote add template-origin
"
${
update
[0]
}
"
else
old_remote
=
$(
git remote get-url template-origin
)
if
[
$old_remote
!=
$remote
]
then
echo
"The remote for the template changed, updating it."
git remote remove template-origin
git remote add template-origin
"
${
update
[0]
}
"
fi
fi
# Check if remote exists
if
!
git ls-remote
"
$remote
"
&> /dev/null
then
echo
"The remote '
$remote
' is not a valid git repository."
echo
"Please update the first line in 'update.txt'."
exit
-1
fi
# Check if remote branch exists
if
!
git ls-remote
--exit-code
--heads
"
$remote
"
"
$branch
"
&> /dev/null
then
echo
"The branch '
$branch
' does not exist on the remote repository."
echo
"Please update the second line in 'update.txt'."
exit
-2
fi
git fetch template-origin
$branch
git merge template-origin/
$branch
echo
"Done!"
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