-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
35 lines (28 loc) · 759 Bytes
/
update.sh
File metadata and controls
35 lines (28 loc) · 759 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
33
34
35
#!/bin/zsh
function ztk-update() {
_ztk-update "$@"
if [[ -f "${ZSHCOM__mf_repo_updated:?}" ]]
then
# Re-sourcing self to apply changes before calling post
source "${ZSHCOM__basedir:?}/update.sh"
fi
if [[ -f "${ZSHCOM__mf_update_dependencies:?}" ]]
then
rm "$ZSHCOM__mf_update_dependencies"
# Re-sourcing self to apply changes before calling post
echo "Re-sourcing ${ZSHCOM__mf_init:?}"
# shellcheck disable=SC1090
source "$ZSHCOM__mf_init"
fi
}
function _post_ztk-update() {
rm "$ZSHCOM__mf_repo_updated"
echo "Re-sourcing $ZSHCOM__mf_init"
# shellcheck disable=SC1090
source "$ZSHCOM__mf_init"
touch "${ZSHCOM__mf_break_init:?}"
}
if [[ -f "$ZSHCOM__mf_repo_updated" ]]
then
_post_ztk-update
fi