Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
liu-puppet-modules
aes
Commits
9390b2a4
Commit
9390b2a4
authored
4 years ago
by
Filip Strömbäck
Browse files
Options
Downloads
Patches
Plain Diff
Updated the 'update_repo.sh' script to hopefully act better during initial setup.
parent
86dbdb56
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/update_repo.sh
+15
-1
15 additions, 1 deletion
files/update_repo.sh
with
15 additions
and
1 deletion
files/update_repo.sh
+
15
−
1
View file @
9390b2a4
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# The command is called as follows:
# The command is called as follows:
# update_repo.sh <destination path> <source repo> <source branch>
# update_repo.sh <destination path> <source repo> <source branch>
# If REPO_ON_UPDATE is set, then that
command
will be executed whenever the repo is created and/or
# If REPO_ON_UPDATE is set, then that
file
will be executed whenever the repo is created and/or
# updated to a new revision. This can be used to trigger further processing of some sort, such as
# updated to a new revision. This can be used to trigger further processing of some sort, such as
# compiling the contained source and/or restarting system services as appropriate.
# compiling the contained source and/or restarting system services as appropriate.
...
@@ -58,6 +58,20 @@ then
...
@@ -58,6 +58,20 @@ then
exit
2
exit
2
fi
fi
# Check if the REPO_ON_UPDATE script exists. If it doesn't (probably
# because Puppet has not created it yet), then we don't want to run
# yet. If we run without the script being present, then the script
# will not be executed until the repository is updated, thus breaking
# our promises.
if
[[
!
-z
"
$REPO_ON_UPDATE
"
]]
then
if
[[
!
-f
"
$REPO_ON_UPDATE
"
]]
then
echo
"The script
$REPO_ON_UPDATE
does not exist."
exit
4
fi
fi
# Setup variables for calling "update_repo"...
# Setup variables for calling "update_repo"...
repo_path
=
"
$1
"
repo_path
=
"
$1
"
repo_source
=
"
$2
"
repo_source
=
"
$2
"
...
...
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