Skip to content

Commit e1f06d3

Browse files
committed
build: update to support wrapping a dtype kind description
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: passed - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 239d0a4 commit e1f06d3

File tree

1 file changed

+14
-7
lines changed
  • lib/node_modules/@stdlib/random/scripts/scaffolds/binary/scripts

1 file changed

+14
-7
lines changed

lib/node_modules/@stdlib/random/scripts/scaffolds/binary/scripts/scaffold.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ readme_from_desc=${README_FROM_DESC:-'a continuous [uniform][@stdlib/random/base
141141
readme_heading=${README_HEADING:-'Uniform Random Numbers'}
142142

143143
# Define the data type kind description:
144-
readme_dtype_kind_desc=${README_DTYPE_KIND_DESC:-'real-valued floating-point'}
144+
readme_dtype_kind_desc=${README_DTYPE_KIND_DESC:-'a real-valued floating-point'}
145145

146146
# Define the data type kind package:
147147
readme_dtype_kind_pkg=${README_DTYPE_KIND_PKG:-'stdlib/ndarray/dtypes'}
@@ -215,19 +215,23 @@ repl_text_factory_desc="${repl_text_factory_desc/ /}"
215215

216216
repl_text_param_1_desc=$(echo " ${repl_text_param_1_desc}" | "${wrap}")
217217
repl_text_param_1_desc="${repl_text_param_1_desc/ /}"
218-
repl_text_param_1_desc=$(echo "${repl_text_param_1_desc}" | sed 's/^ / /')
218+
repl_text_param_1_desc="${repl_text_param_1_desc// / }"
219219

220220
repl_text_param_2_desc=$(echo " ${repl_text_param_2_desc}" | "${wrap}")
221221
repl_text_param_2_desc="${repl_text_param_2_desc/ /}"
222-
repl_text_param_2_desc=$(echo "${repl_text_param_2_desc}" | sed 's/^ / /')
222+
repl_text_param_2_desc="${repl_text_param_2_desc// / }"
223223

224224
repl_text_assign_param_1_desc=$(echo " ${repl_text_assign_param_1_desc}" | "${wrap}")
225225
repl_text_assign_param_1_desc="${repl_text_assign_param_1_desc/ /}"
226-
repl_text_assign_param_1_desc=$(echo "${repl_text_assign_param_1_desc}" | sed 's/^ / /')
226+
repl_text_assign_param_1_desc="${repl_text_assign_param_1_desc// / }"
227227

228228
repl_text_assign_param_2_desc=$(echo " ${repl_text_assign_param_2_desc}" | "${wrap}")
229229
repl_text_assign_param_2_desc="${repl_text_assign_param_2_desc/ /}"
230-
repl_text_assign_param_2_desc=$(echo "${repl_text_assign_param_2_desc}" | sed 's/^ / /')
230+
repl_text_assign_param_2_desc="${repl_text_assign_param_2_desc// / }"
231+
232+
repl_text_dtype_desc=$(echo " Array data type. Must be ${readme_dtype_kind_desc} or \"generic\" data type." | "${wrap}")
233+
repl_text_dtype_desc="${repl_text_dtype_desc/ /}"
234+
repl_text_dtype_desc="${repl_text_dtype_desc// / }"
231235

232236
# Define the copyright year:
233237
year=$(date +'%Y')
@@ -275,12 +279,12 @@ files=(
275279
)
276280

277281
# Create the destination directories...
278-
for dir in ${dirs[*]}; do
282+
for dir in "${dirs[@]}"; do
279283
mkdir -p "${dest_dir}/${dir}"
280284
done
281285

282286
# Copy the scaffold files to the destination directory...
283-
for file in ${files[*]}; do
287+
for file in "${files[@]}"; do
284288
cp "${this_dir}/data/${file//\./__}.txt" "${dest_dir}/${file}"
285289
done
286290

@@ -421,6 +425,9 @@ find_and_replace "${regex}"
421425
regex="s/\\{\\{REPL_TEXT_ASSIGN_PARAM_2_DESC\\}\\}/${repl_text_assign_param_2_desc}/g;"
422426
find_and_replace "${regex}"
423427

428+
regex="s/\\{\\{REPL_TEXT_DTYPE_DESC\\}\\}/${repl_text_dtype_desc}/g;"
429+
find_and_replace "${regex}"
430+
424431
keywords_sep='",\n "'
425432
if [ "${#keywords[*]}" -eq 0 ]; then
426433
words=''

0 commit comments

Comments
 (0)