Revision 5a78e2e7
b/autotools/build-bash-completion | ||
---|---|---|
85 | 85 |
sw.IncIndent() |
86 | 86 |
try: |
87 | 87 |
node_list_path = os.path.join(constants.DATA_DIR, "ssconf_node_list") |
88 |
sw.Write("cat %s", utils.ShellQuote(node_list_path)) |
|
88 |
sw.Write("cat %s 2>/dev/null || :", utils.ShellQuote(node_list_path))
|
|
89 | 89 |
finally: |
90 | 90 |
sw.DecIndent() |
91 | 91 |
sw.Write("}") |
... | ... | |
95 | 95 |
try: |
96 | 96 |
instance_list_path = os.path.join(constants.DATA_DIR, |
97 | 97 |
"ssconf_instance_list") |
98 |
sw.Write("cat %s", utils.ShellQuote(instance_list_path)) |
|
98 |
sw.Write("cat %s 2>/dev/null || :", utils.ShellQuote(instance_list_path))
|
|
99 | 99 |
finally: |
100 | 100 |
sw.DecIndent() |
101 | 101 |
sw.Write("}") |
... | ... | |
104 | 104 |
sw.IncIndent() |
105 | 105 |
try: |
106 | 106 |
# FIXME: this is really going into the internals of the job queue |
107 |
sw.Write("local jlist=$( cd %s && echo job-*; )", |
|
107 |
sw.Write(("local jlist=$( shopt -s nullglob &&" |
|
108 |
" cd %s 2>/dev/null && echo job-* || : )"), |
|
108 | 109 |
utils.ShellQuote(constants.QUEUE_DIR)) |
109 |
sw.Write("echo ${jlist//job-/}")
|
|
110 |
sw.Write('echo "${jlist//job-/}"')
|
|
110 | 111 |
finally: |
111 | 112 |
sw.DecIndent() |
112 | 113 |
sw.Write("}") |
... | ... | |
116 | 117 |
try: |
117 | 118 |
# FIXME: Make querying the master for all OSes cheap |
118 | 119 |
for path in constants.OS_SEARCH_PATH: |
119 |
sw.Write("( cd %s && echo *; )", utils.ShellQuote(path)) |
|
120 |
sw.Write("( shopt -s nullglob && cd %s 2>/dev/null && echo * || : )", |
|
121 |
utils.ShellQuote(path)) |
|
120 | 122 |
finally: |
121 | 123 |
sw.DecIndent() |
122 | 124 |
sw.Write("}") |
Also available in: Unified diff