Skip to content

Conversation

@SimonThalvorsen
Copy link
Contributor

unpack-tarballs: formatted script with shfmt

unpack-tarballs: formatted script with shfmt
@olehermanse olehermanse requested a review from larsewi January 7, 2026 16:05
@olehermanse
Copy link
Member

@cf-bottom please test this in jenkins

@cf-bottom
Copy link

Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Nice work 🚀

# > 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' )

@larsewi larsewi merged commit 9cb1dcc into cfengine:master Jan 8, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants