@@ -19,26 +19,26 @@ do_set() {
19
19
20
20
# -------------------------- set ------------------------- #
21
21
# Source category pre
22
- if [ -f " $dbDir /$category /set-pre.sh" ]; then
23
- sh " $dbDir /$category /set-pre.sh" " $dbDir /$category " " $program "
22
+ if [ -f " $db_dir /$category /set-pre.sh" ]; then
23
+ sh " $db_dir /$category /set-pre.sh" " $db_dir /$category " " $program "
24
24
fi
25
25
26
26
# Source program pre
27
- if [ -f " $dbDir /$category /$program /set-pre.sh" ]; then
28
- sh " $dbDir /$category /$program /set-pre.sh" " $dbDir /$category " " $program "
27
+ if [ -f " $db_dir /$category /$program /set-pre.sh" ]; then
28
+ sh " $db_dir /$category /$program /set-pre.sh" " $db_dir /$category " " $program "
29
29
fi
30
30
31
31
# Actually set
32
- printf " %s" " $program " > | " $dbDir /$category /_.current"
32
+ printf " %s" " $program " > | " $db_dir /$category /_.current"
33
33
34
34
# Source program post
35
- if [ -f " $dbDir /$category /$program /set-post.sh" ]; then
36
- sh " $dbDir /$category /$program /set-post.sh" " $dbDir /$category " " $program "
35
+ if [ -f " $db_dir /$category /$program /set-post.sh" ]; then
36
+ sh " $db_dir /$category /$program /set-post.sh" " $db_dir /$category " " $program "
37
37
fi
38
38
39
39
# Source category post
40
- if [ -f " $dbDir /$category /set-post.sh" ]; then
41
- sh " $dbDir /$category /set-post.sh" " $dbDir /$category " " $program "
40
+ if [ -f " $db_dir /$category /set-post.sh" ]; then
41
+ sh " $db_dir /$category /set-post.sh" " $db_dir /$category " " $program "
42
42
fi
43
43
44
44
log.info " Category '$category ' defaults to '$program '"
@@ -54,11 +54,11 @@ do_launch() {
54
54
category=" $REPLY "
55
55
56
56
# Check to ensure category is set
57
- if [ ! -f " $dbDir /$category /_.current" ]; then
57
+ if [ ! -f " $db_dir /$category /_.current" ]; then
58
58
log.die " $gui " " Program for '$category ' is not set. Please set with 'choose set'"
59
59
fi
60
60
61
- program=" $( < " $dbDir /$category /_.current" ) "
61
+ program=" $( < " $db_dir /$category /_.current" ) "
62
62
63
63
# ensure variable (we already use 'ensure_has_dot_current' in
64
64
# helper_get_category_filter; this is another safeguard)
@@ -68,40 +68,40 @@ do_launch() {
68
68
69
69
# ------------------------ launch ------------------------ #
70
70
# Source category pre
71
- if [ -f " $dbDir /$category /launch-pre.sh" ]; then
72
- sh " $dbDir /$category /launch-pre.sh" " $dbDir /$category " " $program "
71
+ if [ -f " $db_dir /$category /launch-pre.sh" ]; then
72
+ sh " $db_dir /$category /launch-pre.sh" " $db_dir /$category " " $program "
73
73
fi
74
74
75
75
# Source program pre
76
- if [ -f " $dbDir /$category /$program /launch-pre.sh" ]; then
77
- sh " $dbDir /$category /$program /launch-pre.sh" " $dbDir /$category " " $program "
76
+ if [ -f " $db_dir /$category /$program /launch-pre.sh" ]; then
77
+ sh " $db_dir /$category /$program /launch-pre.sh" " $db_dir /$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
- if [ -f " $dbDir /$category /$program /launch.sh" ]; then
83
- if ! sh " $dbDir /$category /$program /launch.sh" " $dbDir /$category " " $program " ; then
82
+ if [ -f " $db_dir /$category /$program /launch.sh" ]; then
83
+ if ! sh " $db_dir /$category /$program /launch.sh" " $db_dir /$category " " $program " ; then
84
84
log.die " $gui " " Source failed"
85
85
fi
86
86
else
87
87
log.die " $gui " " launch.sh for program '$program ' does not exist"
88
88
fi
89
89
90
90
# Source program post
91
- if [ -f " $dbDir /$category /$program /launch-post.sh" ]; then
92
- sh " $dbDir /$category /$program /launch-post.sh" " $dbDir /$category " " $program "
91
+ if [ -f " $db_dir /$category /$program /launch-post.sh" ]; then
92
+ sh " $db_dir /$category /$program /launch-post.sh" " $db_dir /$category " " $program "
93
93
fi
94
94
95
95
# Source category post
96
- if [ -f " $dbDir /$category /launch-post.sh" ]; then
97
- sh " $dbDir /$category /launch-post.sh" " $dbDir /$category " " $program "
96
+ if [ -f " $db_dir /$category /launch-post.sh" ]; then
97
+ sh " $db_dir /$category /launch-post.sh" " $db_dir /$category " " $program "
98
98
fi
99
99
}
100
100
101
101
do_print () {
102
102
local category=" $1 "
103
103
104
- program=" $( < " $dbDir /$category /_.current" ) "
104
+ program=" $( < " $db_dir /$category /_.current" ) "
105
105
106
106
# ensure variable (we already use 'ensure_has_dot_current' in
107
107
# helper_get_category_filter; this is another safeguard)
0 commit comments