File tree 1 file changed +26
-9
lines changed
1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change 18
18
# The directory where this plugin is located.
19
19
CURRENT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
20
20
21
- pushd $CURRENT_DIR # Pushd to the directory where this plugin is located.
21
+ if [ ! -f $CURRENT_DIR /tmux-mem-cpu-load ] && ! $( builtin type -P " tmux-mem-cpu-load" & > /dev/null) ; then
22
+ tmux run-shell " echo \" tmux-mem-cpu-load not found. Attempting to build.
23
+ \" "
22
24
23
- # Attempt to rebuild the plugin and log any errors in the tmux display window.
24
- if output=$( cmake . 2>&1 ) ; then tmux run-shell " echo \" 'cmake $CURRENT_DIR ' failed.
25
- $output
26
- \" " ; else exit 1; fi
25
+ pushd $CURRENT_DIR # Pushd to the directory where this plugin is located.
27
26
28
- if output=$( make 2>&1 ) ; then tmux run-shell " echo \" tmux-mem-cpu-load failed to build.
29
- $output
30
- \" " ; else exit 1; fi
27
+ # Attempt to rebuild the plugin and log any errors in the tmux display window.
28
+ if output=$( cmake . 2>&1 ) ; then
29
+ tmux run-shell " echo \" 'cmake $CURRENT_DIR ' completed successfully.
30
+ \" "
31
+ else
32
+ tmux run-shell " echo \" 'cmake $CURRENT_DIR ' failed. Error logged below.
33
+ $output
34
+ \" "
35
+ exit 1
36
+ fi
37
+
38
+ if output=$( make 2>&1 ) ; then
39
+ tmux run-shell " echo \" tmux-mem-cpu-load built successfully.
40
+ \" "
41
+ else
42
+ tmux run-shell " echo \" tmux-mem-cpu-load failed to build. Error logged below.
43
+ $output
44
+ \" "
45
+ exit 1
46
+ fi
47
+ popd
48
+ fi
31
49
32
- popd
You can’t perform that action at this time.
0 commit comments