Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
F
Flow-s Gentoo ebuilds
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
Florian Schmaus
Flow-s Gentoo ebuilds
Commits
a9215c90
Unverified
Commit
a9215c90
authored
10 months ago
by
Florian Schmaus
Browse files
Options
Downloads
Patches
Plain Diff
greadme.eclass: autoformat readme
Signed-off-by:
Florian Schmaus
<
flow@gentoo.org
>
parent
7fc99020
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
eclass/greadme.eclass
+17
-1
17 additions, 1 deletion
eclass/greadme.eclass
with
17 additions
and
1 deletion
eclass/greadme.eclass
+
17
−
1
View file @
a9215c90
...
...
@@ -61,6 +61,11 @@ _GREADME_REL_PATH="/usr/share/doc/${PF}/${_GREADME_FILENAME}"
# file in pkg_postinst via elog. If set to "no", then do not show the
# contents of the readme file, even if they have changed.
# @ECLASS_VARIABLE: GREADME_AUTOFORMATTING_DISABLED
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, the readme file will not be automatically formatted.
# @FUNCTION: greadme_stdin
# @USAGE: [--append]
# @DESCRIPTION:
...
...
@@ -124,10 +129,21 @@ greadme_file() {
_greadme_install_doc
()
{
debug-print-function
${
FUNCNAME
}
"
${
@
}
"
local
greadme
=
"
${
_GREADME_TMP_FILE
}
"
if
[[
!
"
${
GREADME_AUTOFORMATTING_DISABLED
}
"
]]
;
then
greadme
=
"
${
_GREADME_TMP_FILE
}
"
.formatted
# Use fold, followed by a sed to strip trailing whitespace.
# https://bugs.gentoo.org/460050#c7
fold
-s
-w
70
"
${
_GREADME_TMP_FILE
}
"
|
sed
's/[[:space:]]*$//'
>
"
${
greadme
}
"
assert
"failed to autoformat
${
_GREADME_FILENAME
}
"
fi
# Subshell to avoid pollution of calling environment.
(
docinto
.
do
doc
"
${
_GREADME_
TMP_FIL
E
}
"
new
doc
"
${
greadme
}
"
"
${
_GREADME_
FILENAM
E
}
"
)
# Exclude the readme file from compression, so that its contents can
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment