@@ -20,25 +20,25 @@ do_set() {
20
20
# -------------------------- set ------------------------- #
21
21
# Source category pre
22
22
if [ -f " $dbDir /$category /set-pre.sh" ]; then
23
- source " $dbDir /$category /set-pre.sh"
23
+ source " $dbDir /$category /set-pre.sh" " $dbDir / $category " " $program "
24
24
fi
25
25
26
26
# Source program pre
27
27
if [ -f " $dbDir /$category /$program /set-pre.sh" ]; then
28
- source " $dbDir /$category /$program /set-pre.sh"
28
+ source " $dbDir /$category /$program /set-pre.sh" " $dbDir / $category " " $program "
29
29
fi
30
30
31
31
# Actually set
32
32
printf " %s" " $program " > | " $dbDir /$category /_.current"
33
33
34
34
# Source program post
35
35
if [ -f " $dbDir /$category /$program /set-post.sh" ]; then
36
- source " $dbDir /$category /$program /set-post.sh"
36
+ source " $dbDir /$category /$program /set-post.sh" " $dbDir / $category " " $program "
37
37
fi
38
38
39
39
# Source category post
40
40
if [ -f " $dbDir /$category /set-post.sh" ]; then
41
- source " $dbDir /$category /set-post.sh"
41
+ source " $dbDir /$category /set-post.sh" " $dbDir / $category " " $program "
42
42
fi
43
43
44
44
log.info " Category '$category ' defaults to '$program '"
@@ -69,18 +69,18 @@ do_launch() {
69
69
# ------------------------ launch ------------------------ #
70
70
# Source category pre
71
71
if [ -f " $dbDir /$category /launch-pre.sh" ]; then
72
- source " $dbDir /$category /launch-pre.sh"
72
+ source " $dbDir /$category /launch-pre.sh" " $dbDir / $category " " $program "
73
73
fi
74
74
75
75
# Source program pre
76
76
if [ -f " $dbDir /$category /$program /launch-pre.sh" ]; then
77
- source " $dbDir /$category /$program /launch-pre.sh"
77
+ source " $dbDir /$category /$program /launch-pre.sh" " $dbDir / $category " " $program "
78
78
fi
79
79
80
80
# Source launch if it exists. If otherwise, infer
81
81
# the launch command from the program name
82
82
if [ -f " $dbDir /$category /$program /launch.sh" ]; then
83
- if ! source " $dbDir /$category /$program /launch.sh" ; then
83
+ if ! source " $dbDir /$category /$program /launch.sh" " $dbDir / $category " " $program " ; then
84
84
log.die " $gui " " Source failed"
85
85
fi
86
86
else
@@ -89,12 +89,12 @@ do_launch() {
89
89
90
90
# Source program post
91
91
if [ -f " $dbDir /$category /$program /launch-post.sh" ]; then
92
- source " $dbDir /$category /$program /launch-post.sh"
92
+ source " $dbDir /$category /$program /launch-post.sh" " $dbDir / $category " " $program "
93
93
fi
94
94
95
95
# Source category post
96
96
if [ -f " $dbDir /$category /launch-post.sh" ]; then
97
- source " $dbDir /$category /launch-post.sh"
97
+ source " $dbDir /$category /launch-post.sh" " $dbDir / $category " " $program "
98
98
fi
99
99
}
100
100
0 commit comments