-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
51 lines (42 loc) · 1 KB
/
entrypoint.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
# shellcheck source=./lib/init.sh
source ./lib/init.sh
if [[ -z "${DOTFILES_LIB_DIR}" ]];
then
echo "DOTFILES_LIB_DIR is not set" >&2
fi
# shellcheck source=./lib/iter.sh
source "${DOTFILES_LIB_DIR}"/iter.sh
# shellcheck source=./lib/scripts.sh
source "${DOTFILES_LIB_DIR}"/scripts.sh
# shellcheck source=./lib/steps.sh
source "${DOTFILES_LIB_DIR}"/steps.sh
scripts_dirs=()
for script_basename in "${@}";
do
scripts_dirs+=("${DOTFILES_SCRIPTS_DIR}/${script_basename}")
done
if [[ -z "${scripts_dirs[*]}" ]];
then
for script_dir in $(dotfiles::scripts::list);
do
scripts_dirs+=("${script_dir}")
done
fi
for i in $(dotfiles::iter::range);
do
for script_dir in "${scripts_dirs[@]}";
do
for step in $(dotfiles::steps::list);
do
dotfiles::scripts::run-iteration-step "$script_dir" "$i" "$step"
done
done
done
for script_dir in "${scripts_dirs[@]}";
do
for step in $(dotfiles::steps::list);
do
dotfiles::scripts::run-step "$script_dir" "$step"
done
done