diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2017-06-22 11:44:19 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2017-06-23 09:25:42 -0400 |
commit | 46c6ca3b9ee3e545a41b3b0f488885b20a1c65b5 (patch) | |
tree | aa647a35566e714faa801f66a711ebb6f0da34f3 /projects/crossgcc | |
parent | 7c8e518c62c6bbe6cd2b465099c561d8d53d38e9 (diff) | |
download | librebootfr-46c6ca3b9ee3e545a41b3b0f488885b20a1c65b5.tar.gz librebootfr-46c6ca3b9ee3e545a41b3b0f488885b20a1c65b5.zip |
Fixed printf calls & replaced 'echo' w/ printf.
All printf calls should now be properly formatted; prior, the
format specifier string was erroneously used for both the format
specifiers and the string to be printed. 'env' is now used to
locate the printf binary so as to avoid potentially using a shell
builtin. Lastly, all calls to 'echo' within the new build system
have been replaced with printf for consistency/portability purposes.
Diffstat (limited to 'projects/crossgcc')
-rwxr-xr-x | projects/crossgcc/crossgcc | 8 | ||||
-rwxr-xr-x | projects/crossgcc/crossgcc-helper | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/projects/crossgcc/crossgcc b/projects/crossgcc/crossgcc index aa930213..1fa3b041 100755 --- a/projects/crossgcc/crossgcc +++ b/projects/crossgcc/crossgcc @@ -52,7 +52,7 @@ extract() { if [ -f "$tarball_sources_path" ] && ! [ -f "$tarball_install_path" ] then - printf "Copying source archive $tarball for $project (with ${arguments:-no argument})\n" + env printf '%s\n' "Copying source archive $tarball for $project (with ${arguments:-no argument})" mkdir -p "$tarball_install_directory_path" @@ -92,7 +92,7 @@ update() { if [ -f $tarball_sources_path ] then - printf "Copying source archive $tarball for $project (with ${arguments:-no argument})\n" + env printf '%s\n' "Copying source archive $tarball for $project (with ${arguments:-no argument})" mkdir -p "$tarball_install_directory_path" @@ -123,7 +123,7 @@ prefix() { case $arch in "arm") - echo "$build_path/bin/arm-eabi-" + env printf '%s\n' "$build_path/bin/arm-eabi-" ;; esac } @@ -180,7 +180,7 @@ release() { if [ -f "$tarball_install_path" ] && ! [ -f "$tarball_release_path" ] then - printf "Releasing source archive $tarball for $project (with ${arguments:-no argument})\n" + env printf '%s\n' "Releasing source archive $tarball for $project (with ${arguments:-no argument})" cp "$tarball_install_path" "$tarball_release_path" file_verification_create "$tarball_release_path" diff --git a/projects/crossgcc/crossgcc-helper b/projects/crossgcc/crossgcc-helper index b4979f89..a3d11ddf 100755 --- a/projects/crossgcc/crossgcc-helper +++ b/projects/crossgcc/crossgcc-helper @@ -20,7 +20,7 @@ crossgcc_tarballs() { local install_path="$sources_path/util/crossgcc/tarballs/" local tarballs=$( ls "$sources_path/util/crossgcc/sum" | sed "s/.cksum$//" ) - echo "$tarballs" + env printf '%s\n' "$tarballs" } crossgcc_tarball_sources_path() { @@ -28,7 +28,7 @@ crossgcc_tarball_sources_path() { local tarball_sources_path="$root/$SOURCES/$tarball" - echo "$tarball_sources_path" + env printf '%s\n' "$tarball_sources_path" } crossgcc_tarball_install_path() { @@ -39,7 +39,7 @@ crossgcc_tarball_install_path() { local install_path="$sources_path/util/crossgcc/tarballs/" local tarball_install_path="$install_path/$tarball" - echo "$tarball_install_path" + env printf '%s\n' "$tarball_install_path" } crossgcc_tarball_release_path() { @@ -49,5 +49,5 @@ crossgcc_tarball_release_path() { local release_path=$( project_release_path "$project" "$SOURCES" "$@" ) local tarball_release_path="$release_path/$tarball" - echo "$tarball_release_path" + env printf '%s\n' "$tarball_release_path" } |