-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpull
More file actions
executable file
·32 lines (25 loc) · 943 Bytes
/
pull
File metadata and controls
executable file
·32 lines (25 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
################################################################################
#
# This script pulls the project configuration files from a remote Git repository.
#
# The code of the script assumes that:
#
# 1. The project uses this code as a Git sub-module installed in the `config`
# directory under the project root.
#
# 2. The script is called from the root of the project.
#
################################################################################
# Update the module with reference to the latest version.
# In this state there is no current branch.
git submodule update
# Make the `config` dir current.
cd ./config || { echo "Error: 'config' directory is missing."; exit 1; }
# Set the current branch to `master`.
git checkout master
echo "Pulling changes from remote repo"
git pull
# Handle file operations related to the migration from the previous version(s).
source migrate
echo "Done."