Changeset f6d5ca1 in wspkg for debian/debian.deps.sh


Ignore:
Timestamp:
Feb 28, 2019, 8:42:37 PM (3 years ago)
Author:
Ting-Wei Lan <lantw44@…>
Branches:
master
Children:
a2c0986
Parents:
2e6149f
git-author:
Ting-Wei Lan <lantw44@…> (02/28/19 20:27:39)
git-committer:
Ting-Wei Lan <lantw44@…> (02/28/19 20:42:37)
Message:

Use 'printf' to print non-constant strings in shell scripts

It is unsafe to use 'echo' with strings with variable substitutions.
Different 'echo' implementations may accept different options, and they
can interpret strings with escape characters in different ways. The
behavior of 'printf' is much more consistent so it should be preferred.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/debian.deps.sh

    r2e6149f rf6d5ca1  
    77for pkg in `cat "${list_file}"`; do
    88        if [ "${loop_first}" = "1" ]; then
    9                 printf "%s" "${pkg}"
     9                printf '%s' "${pkg}"
    1010        else
    11                 printf ", %s" "${pkg}"
     11                printf ', %s' "${pkg}"
    1212        fi
    1313        loop_first=0
Note: See TracChangeset for help on using the changeset viewer.