Run shellcheck also for starter.sh
Fix typo
This commit is contained in:
17
build.sh
17
build.sh
@@ -71,10 +71,11 @@ build::rdlink() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
printf '# Building rdlink release\n'
|
||||
printf '# Building releases based on rdlink.sh\n'
|
||||
|
||||
build::headerRdlink "${rdlinkRelease}"
|
||||
printf ' Extracting script part and removing debug information...'
|
||||
printf ' (Extracting script part and removing debug information)\n'
|
||||
printf ' Building release/rdlink.sh...'
|
||||
# Get essential script content
|
||||
# * extract script part
|
||||
# * remove script marker
|
||||
@@ -93,7 +94,7 @@ build::rdlink() {
|
||||
|
||||
{
|
||||
build::headerStarter "${starterRelease}"
|
||||
printf ' Building starter...'
|
||||
printf ' Building release/starter.sh...'
|
||||
if sed -n '/### Script.*/,/### Script Starter EOF/ p' < "${build_dir}/rdlink.sh" \
|
||||
| sed '/### Script.*/d; /^[[:blank:]]*info/d; /-d\{1,2\}/,/;;/d' \
|
||||
| sed '/^$/N; /^\n$/D' \
|
||||
@@ -108,19 +109,25 @@ build::rdlink() {
|
||||
printf 'export _origin\n\n' >> "${starterRelease}"
|
||||
|
||||
printf '# Uncomment one of the next lines and replace "tostart.sh" with your script\n' >> "${starterRelease}"
|
||||
printf '# to have _origin available even on platform not supporting readlink -f.\n\n' >> "${starterRelease}"
|
||||
printf '# to have _origin available even on platforms not supporting readlink -f.\n\n' >> "${starterRelease}"
|
||||
printf '#bash "${_origin}/tostart.sh"\n' >> "${starterRelease}"
|
||||
printf '#. "${_origin}/tostart.sh"\n' >> "${starterRelease}"
|
||||
printf '#"${_origin}/tostart.sh"\n' >> "${starterRelease}"
|
||||
}
|
||||
|
||||
if [[ "${shellcheck_cmd}" ]] ; then
|
||||
printf '%b\n' " Running shellcheck...\033[1A\033[s\n"
|
||||
printf '%b\n' " Running shellcheck for rdlink...\033[1A\033[s\n"
|
||||
if "${shellcheck_cmd}" "${rdlinkRelease}" ; then
|
||||
printf '%b' "\033[u${testresult_graphic}\n"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
printf '%b\n' " Running shellcheck for starter...\033[1A\033[s\n"
|
||||
if "${shellcheck_cmd}" "${starterRelease}" ; then
|
||||
printf '%b' "\033[u${testresult_graphic}\n"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
chmod +x "${rdlinkRelease}"
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user