summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-07-26 13:34:39 +0200
committerMichał Górny <mgorny@gentoo.org>2018-08-09 16:08:40 +0200
commit03cc71a6dc5dd5e0af302bacd3ef1a17e3c5d8f0 (patch)
tree53240db56be823a6942bd1c1e369746bd97aa4bc /eclass/desktop.eclass
parentdesktop.eclass: domenu, remove unnecessary nested loop (diff)
downloadgentoo-03cc71a6dc5dd5e0af302bacd3ef1a17e3c5d8f0.tar.gz
gentoo-03cc71a6dc5dd5e0af302bacd3ef1a17e3c5d8f0.tar.bz2
gentoo-03cc71a6dc5dd5e0af302bacd3ef1a17e3c5d8f0.zip
desktop.eclass: Add missing ||die when writing to files
Diffstat (limited to 'eclass/desktop.eclass')
-rw-r--r--eclass/desktop.eclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass
index 08899b4a4607..6fc72ab8ec03 100644
--- a/eclass/desktop.eclass
+++ b/eclass/desktop.eclass
@@ -174,7 +174,7 @@ make_desktop_entry() {
icon=${icon%.*}
fi
- cat <<-EOF > "${desktop}"
+ cat <<-EOF > "${desktop}" || die
[Desktop Entry]
Name=${name}
Type=Application
@@ -190,7 +190,9 @@ make_desktop_entry() {
ewarn "make_desktop_entry: update your 5th arg to read Path=${fields}"
fields="Path=${fields}"
fi
- [[ -n ${fields} ]] && printf '%b\n' "${fields}" >> "${desktop}"
+ if [[ -n ${fields} ]]; then
+ printf '%b\n' "${fields}" >> "${desktop}" || die
+ fi
(
# wrap the env here so that the 'insinto' call
@@ -217,7 +219,7 @@ make_session_desktop() {
local desktop=${T}/${wm:-${PN}}.desktop
shift 2
- cat <<-EOF > "${desktop}"
+ cat <<-EOF > "${desktop}" || die
[Desktop Entry]
Name=${title}
Comment=This session logs you into ${title}