Commit a55b1a4 1 parent c2248df commit a55b1a4 Copy full SHA for a55b1a4
File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+
3
+ # shellcheck source=./bin/sr3_utils
4
+ source " ${BASH_SOURCE%/* } /sr3_utils"
5
+
6
+ # Pre-pull script: in _dsh_config/${pump_name}_pre_pull_script.
7
+ # If it exists, run it. If the name ends in _bg, run in the background. You can have both.
8
+ sr3_get_git_path_pump_name
9
+ pre_script=" ${git_tld} /_dsh_config/${pump_name} _pre_pull_script"
10
+ if [ -e " ${pre_script} " ]; then
11
+ " ${pre_script} "
12
+ fi
13
+ if [ -e " ${pre_script} _bg" ]; then
14
+ " ${pre_script} _bg" &
15
+ pre_script_bg_pid=" $! "
16
+ fi
17
+
2
18
# plugins could also be a Git repo
3
19
sr3r -bg " cd ~/.config/sr3; \
4
20
git reset --hard HEAD > /dev/null; git pull | awk '{ print \" Config Repo \" \$ 0 }' && if [ -d './plugins/.git' ]; then cd ./plugins && git reset --hard HEAD > /dev/null && git pull | awk '{ print \" Plugins Repo \" \$ 0 }'; fi"
21
+
22
+ # Stop the pre-pull script
23
+ if [ -n " ${pre_script_bg_pid} " ]; then
24
+ kill " ${pre_script_bg_pid} "
25
+ fi
You can’t perform that action at this time.
0 commit comments