Skip to content
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
5 changes: 1 addition & 4 deletions build-scripts/unpack-tarballs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
. compile-options

SOURCE_TARBALL="$BASEDIR/output/tarballs/cfengine-3.*.tar.gz"
# shellcheck disable=SC2010
# > Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.
# TODO: CFE-4587
MASTERFILES_TARBALL=$(ls "$BASEDIR"/output/tarballs/cfengine-masterfiles*.tar.gz | grep -v 'pkg.tar.gz$')
MASTERFILES_TARBALL=$(find "$BASEDIR"/output/tarballs/ -name 'cfengine-masterfiles*.tar.gz' -a ! \( -name '*pkg.tar.gz' \))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these parentheses necessary when there is only one expression inside them?

Suggested change
MASTERFILES_TARBALL=$(find "$BASEDIR"/output/tarballs/ -name 'cfengine-masterfiles*.tar.gz' -a ! \( -name '*pkg.tar.gz' \))
MASTERFILES_TARBALL=$(find "$BASEDIR"/output/tarballs/ -name 'cfengine-masterfiles*.tar.gz' -a ! -name '*pkg.tar.gz' )


# DELETE the git-checked-out directories, they are tainted with
# ./configure artifacts anyway. The tarballs are unpacked and symlinked
Expand Down