Skip to content

Use built-in echo #48

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Aug 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions gen-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -u

if [ -x /bin/echo ]; then
ECHO='/bin/echo'
else
ECHO='echo'
fi
set -ue

msg() {
echo "gen-installer: ${1-}"
Expand Down Expand Up @@ -296,9 +290,8 @@ for bulk_dir in $bulk_dirs; do
manifest=`echo "$manifest" | sed /^$bulk_dir/d`
done

# Add 'file:' installation directives.
# The -n prevents adding a blank file: if the manifest is empty
manifest=`$ECHO -n "$manifest" | sed s/^/file:/`
# Add 'file:' installation directives, skipping empty lines.
manifest=`echo "$manifest" | sed /^$/d | sed s/^/file:/`

# Add 'dir:' directives
for bulk_dir in $bulk_dirs; do
Expand Down