Skip to content

Commit

Permalink
Merge pull request #48 from Diggsey/master
Browse files Browse the repository at this point in the history
Use built-in echo
  • Loading branch information
brson committed Aug 23, 2016
2 parents 4915c75 + f423f49 commit 755bc3d
Showing 1 changed file with 3 additions and 10 deletions.
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

0 comments on commit 755bc3d

Please sign in to comment.