mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
home-manager: minor news build cleanups
- Rename the build function. - Specify the built attribute in the build function. - Make the news build silent.
This commit is contained in:
parent
9c1b3735b4
commit
ad1eee7aa5
1 changed files with 11 additions and 4 deletions
|
@ -75,7 +75,7 @@ function doBuildAttr() {
|
|||
|
||||
function presentNews() {
|
||||
local infoFile
|
||||
infoFile=$(doBuildNews -A newsInfo) || return 1
|
||||
infoFile=$(buildNews) || return 1
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$infoFile"
|
||||
|
@ -170,8 +170,15 @@ function newsReadIdsFile() {
|
|||
echo "$path"
|
||||
}
|
||||
|
||||
function doBuildNews() {
|
||||
doBuildAttr "$*" \
|
||||
# Builds news meta information to be sourced into this script.
|
||||
#
|
||||
# Note, we suppress build output to remove unnecessary verbosity. We
|
||||
# also use "no out link" to avoid the need for a build directory
|
||||
# (although this exposes the risk of GC removing the result before we
|
||||
# manage to source it).
|
||||
function buildNews() {
|
||||
doBuildAttr --quiet \
|
||||
--attr newsInfo \
|
||||
--no-out-link \
|
||||
--arg check false \
|
||||
--argstr newsReadIdsFile "$(newsReadIdsFile)"
|
||||
|
@ -179,7 +186,7 @@ function doBuildNews() {
|
|||
|
||||
function doShowNews() {
|
||||
local infoFile
|
||||
infoFile=$(doBuildNews -A newsInfo) || return 1
|
||||
infoFile=$(buildNews) || return 1
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$infoFile"
|
||||
|
|
Loading…
Reference in a new issue