Skip to content

Commit

Permalink
Merge pull request #1980 from mariux64/beenullify-filter
Browse files Browse the repository at this point in the history
beenullify: filter unwanted comments
  • Loading branch information
wwwutz authored Oct 26, 2020
2 parents 12c0ed5 + fbe26d7 commit db808e7
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions scripts/beenullify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,45 @@ if git status > /dev/null 2>&1; then
MV='git mv -v'
fi


T=/dev/shm/beenullify.$$
exec 10<>$T
rm $T
cat<<_EOPAT_ >&10
# EXCLUDE+=()
##
## './pkg-version-N.bee' or
## 'beesh ./pkg-version-N.bee'
## pkgname-pkgversion-pkgrevision.bee
## 'src' or 'cmake' or ..
## Add filename patterns to the EXCLUDE array of files that should not
## Add URLs/pathes to patch files to the PATCHURL array.
## Additional hints:
## be added to you package but may be present in the image directory.
## bee cannot detect buildtypes specified in subdirectories.
## bee-package. (Additional hints are located at the end of this file.)
## Build the package by executing
## by default this may be 'make install DESTDIR="${D}"'
## Change the default (auto-detected) steps to
## directory.
## downloaded. Version variables may be used to simplify reuse of this bee-file.
## Everything in this file will be executed in a bash environment.
## extract, patch, configure/setup, build and install the software.
## image directory "${D}"
## Make sure the mee_install function does install everything to the
## outside the source directory and need to be build inside the source
## see http://beezinga.org/
## Sometimes packages "hide" the real sources in a subdirectory named
## The name of this bee-file should follow the following naming convention:
## The source URL(s) define the location of the sources that will be
## The sources will be patched in the order of the array.
## this file was created by bee init and should be executed to build a
## Uncomment the next statement, if the software may not be able to be build
## use 'sourcesubdir_append' to specify this directory if known.
## You may remove all comments as long as SRCURL[0]="" is set.
###############################################################################
_EOPAT_

for BEE in "${@+$@}"; do

if [[ $BEE =~ '.be0' ]]; then
Expand All @@ -63,12 +102,15 @@ for BEE in "${@+$@}"; do
REV=$(( $REV + $BUMPBUILD ))

BE0="$PKG.be0"

$MV $BEE $BE0

if test -n "$NEWVERSION"; then
VER=$NEWVERSION
REV=0
fi
sed -i -e "2 i \\\n# BEE_VERSION $PKG-$VER-$REV" -e 's/\s*$//' $BE0
sed -e "2 i \\\n# BEE_VERSION $PKG-$VER-$REV" -e 's/\s*$//' $BE0 > ${BE0}.tmp
grep -vFf /proc/$$/fd/10 ${BE0}.tmp | cat -s > $BE0
rm ${BE0}.tmp

done

0 comments on commit db808e7

Please sign in to comment.