Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/cmredbg/run.sh
3150 views
1
#!/bin/sh
2
3
set -e
4
5
die () {
6
echo >&2 "$@"
7
exit 1
8
}
9
10
test -x "$( which tmux 2>/dev/null )" || die "\`tmux\` is required"
11
test -n "$TMUX" || die "must be running within a \`tmux\` session"
12
test -x "$( which watch )" || die "\`watch\` is required"
13
14
editor="${EDITOR:-nano}"
15
readonly editor
16
17
test -x "$( which "$EDITOR" )" || die "\`$editor\` is required"
18
19
tmux split-window -v -l 10 -c "$PWD" 'watch --interval 1 cmake -P match.cmake'
20
tmux select-pane -l
21
case "$editor" in
22
*vi*)
23
"$editor" re.txt content.txt -c 'vsp|bn'
24
;;
25
*)
26
"$editor" re.txt content.txt
27
;;
28
esac
29
30