-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·34 lines (29 loc) · 1.17 KB
/
update.sh
File metadata and controls
executable file
·34 lines (29 loc) · 1.17 KB
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
33
34
#!/usr/bin/env bash
#
# This script:
# - Updates to the latest version of upstream libraries
# - Runs apply-templates.sh
#
set -Eeuo pipefail
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
# Download upstream php if we don't have it
./download-libs.sh
# Update the known version of PHP to the latest version
echo "Starting update of libraries..."
cd lib/php
echo "Setting remote for docker-library/php..."
git remote set-url origin https://github.com/docker-library/php.git
echo "Pulling latest commits and checking out master for docker-library/php..."
git pull origin master && git checkout master
echo "Storing latest commit as known version for docker-library/php..."
echo "$(git rev-parse HEAD)" > ../.php-known-hash
cd ../bashbrew
echo "Setting remote for docker-library/bashbrew..."
git remote set-url origin https://github.com/docker-library/bashbrew.git
echo "Pulling latest commits and checking out master for docker-library/bashbrew..."
git pull origin master && git checkout master
echo "Storing latest commit as known version for docker-library/bashbrew..."
echo "$(git rev-parse HEAD)" > ../.bashbrew-known-hash
cd ../..
echo "Library update complete."
./apply-templates.sh "$@"