summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-08-23 18:24:31 -0400
committerAndrew Cady <d@jerkface.net>2023-08-23 18:24:31 -0400
commit88a9b8f49123a0679267231d5738e34d93cf86c4 (patch)
tree2f2f3692497fb3315daefbc0e2e4c0f8584a36dd
parenta885b23dc3aab3077b43ea2453a1521d18ea7b05 (diff)
beautify
-rw-r--r--rpc.bash12
1 files changed, 10 insertions, 2 deletions
diff --git a/rpc.bash b/rpc.bash
index 969b6d3..ffadd12 100644
--- a/rpc.bash
+++ b/rpc.bash
@@ -7,8 +7,7 @@ max_script_size=$((1024 * 64))
7our_main() 7our_main()
8{ 8{
9 REMOTE_DEST=localhost 9 REMOTE_DEST=localhost
10 unused=$(main2 "$@" </dev/null | xargs) 10 main2 "$@"
11 [ ! "$unused" ] || printf 'Local only: %s\n' "$unused" >&2
12 main1 "$@" 11 main1 "$@"
13} 12}
14 13
@@ -19,6 +18,12 @@ main1()
19 18
20main2() 19main2()
21{ 20{
21 funcs=$(find_local_only_functions "$@" </dev/null | xargs)
22 [ ! "$funcs" ] || printf 'Local-only functions (main2): %s\n' "$funcs" >&2
23}
24
25find_local_only_functions()
26{
22 intersection <(extract_words < "$BASH_SOURCE") \ 27 intersection <(extract_words < "$BASH_SOURCE") \
23 <(difference <(all_commands) \ 28 <(difference <(all_commands) \
24 <(remote_run_function all_commands)) 29 <(remote_run_function all_commands))
@@ -42,6 +47,9 @@ fudge()
42 exit 47 exit
43} 48}
44 49
50
51
52
45read_remote_command() 53read_remote_command()
46{ 54{
47 len=$1 55 len=$1