Skip to content

Commit de7fb88

Browse files
authored
Merge pull request #376 from continuouspipe/feature/bootstrap-in-one-file
Move all function bootstrap to a single file
2 parents 5ee0e70 + 21003fa commit de7fb88

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

ubuntu/16.04/usr/local/bin/container

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,7 @@ set -e
44
TASK=$1
55
ARGS=( "$@" )
66

7-
# Initialisation - Declare variables and run pre-templating steps.
8-
source /usr/local/share/bootstrap/setup.sh
9-
10-
# Initialisation - Runtime installation tasks
11-
shopt -s nullglob
12-
set -- /usr/local/share/container/baseimage-*
13-
if [ "$#" -gt 0 ]; then
14-
for file in "$@"; do
15-
# shellcheck source=/dev/null
16-
source "${file}"
17-
done
18-
fi
19-
20-
source /usr/local/share/container/plan.sh
21-
if [ -e "$WORK_DIRECTORY/plan.sh" ]; then
22-
# shellcheck source=/dev/null
23-
source "$WORK_DIRECTORY/plan.sh"
24-
fi
7+
source /usr/local/share/bootstrap/bootstrap.sh
258

269
set -x
2710

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Initialisation - Declare variables and run pre-templating steps.
4+
source /usr/local/share/bootstrap/setup.sh
5+
6+
# Initialisation - Runtime installation tasks
7+
shopt -s nullglob
8+
set -- /usr/local/share/container/baseimage-*
9+
if [ "$#" -gt 0 ]; then
10+
for file in "$@"; do
11+
# shellcheck source=/dev/null
12+
source "${file}"
13+
done
14+
fi
15+
16+
source /usr/local/share/container/plan.sh
17+
if [ -e "$WORK_DIRECTORY/plan.sh" ]; then
18+
# shellcheck source=/dev/null
19+
source "$WORK_DIRECTORY/plan.sh"
20+
fi

0 commit comments

Comments
 (0)