Skip to content
Snippets Groups Projects
Commit 9390b2a4 authored by Filip Strömbäck's avatar Filip Strömbäck
Browse files

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
...@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment