diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-12-28 15:46:47 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-12-28 23:52:03 +0100 |
commit | 959df5d8a5b2dd586ae4ef2e4ea1cfb64b3a4fb5 (patch) | |
tree | 57cdb4ea5d174f2fd3a5082850d97cfc846f6654 /scripts/update_terminfo.sh | |
parent | e85b911f026cc0826bb2bd35accc5e1a40546a5b (diff) | |
download | rneovim-959df5d8a5b2dd586ae4ef2e4ea1cfb64b3a4fb5.tar.gz rneovim-959df5d8a5b2dd586ae4ef2e4ea1cfb64b3a4fb5.tar.bz2 rneovim-959df5d8a5b2dd586ae4ef2e4ea1cfb64b3a4fb5.zip |
update_terminfo.sh: Use printf instead of echo
Diffstat (limited to 'scripts/update_terminfo.sh')
-rwxr-xr-x | scripts/update_terminfo.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/update_terminfo.sh b/scripts/update_terminfo.sh index 87a2adaed5..3e97b4f7e0 100755 --- a/scripts/update_terminfo.sh +++ b/scripts/update_terminfo.sh @@ -76,15 +76,16 @@ EOF for term in $sorted_terms; do path="$(find "$db" -name "$term")" - if [[ -z $path ]]; then - echo "Not found: $term. Skipping." 1>&2 + if [ -z "$path" ]; then + >&2 echo "Not found: $term. Skipping." continue fi - echo + printf '\n' infocmp -L -1 -A "$db" "$term" | sed -e '1d' -e 's#^#// #' | tr '\t' ' ' - echo "static const int8_t ${entries[$term]}[] = {" - echo -n " "; od -v -t d1 < "$path" | cut -c9- | xargs | tr ' ' ',' - echo "};" + printf 'static const int8_t %s[] = {\n' "${entries[$term]}" + printf ' ' + od -v -t d1 < "$path" | cut -c9- | xargs | tr ' ' ',' + printf '};\n' done >> "$target" cat >> "$target" <<EOF |