Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/
Date: Thu, 29 Oct 2020 21:00:43
Message-Id: 1603177803.c2b6d25fb883cdcc36e05d44507326d7ae53f560.mattst88@gentoo
1 commit: c2b6d25fb883cdcc36e05d44507326d7ae53f560
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 19 22:47:34 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 20 07:10:03 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c2b6d25f
7
8 targets: Move create_handbook_icon() to its use
9
10 And use <<- so we can indent the heredoc properly.
11
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 targets/support/chroot-functions.sh | 14 --------------
15 targets/support/livecdfs-update.sh | 15 +++++++++++++++
16 2 files changed, 15 insertions(+), 14 deletions(-)
17
18 diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
19 index 307a9042..22340023 100755
20 --- a/targets/support/chroot-functions.sh
21 +++ b/targets/support/chroot-functions.sh
22 @@ -303,20 +303,6 @@ show_debug() {
23 fi
24 }
25
26 -create_handbook_icon() {
27 - # This function creates a local icon to the Gentoo Handbook
28 - echo "[Desktop Entry]
29 -Encoding=UTF-8
30 -Version=1.0
31 -Type=Link
32 -URL=file:///mnt/cdrom/docs/handbook/html/index.html
33 -Terminal=false
34 -Name=Gentoo Linux Handbook
35 -GenericName=Gentoo Linux Handbook
36 -Comment=This is a link to the local copy of the Gentoo Linux Handbook.
37 -Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
38 -}
39 -
40 readonly locales="
41 C.UTF8 UTF-8
42 "
43
44 diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
45 index 557d990b..47dbb5b3 100755
46 --- a/targets/support/livecdfs-update.sh
47 +++ b/targets/support/livecdfs-update.sh
48 @@ -243,6 +243,21 @@ case ${clst_livecd_type} in
49 # Clear out lastlog
50 rm -f /var/log/lastlog && touch /var/log/lastlog
51
52 + create_handbook_icon() {
53 + cat <<-EOF > /usr/share/applications/gentoo-handbook.desktop
54 + [Desktop Entry]
55 + Encoding=UTF-8
56 + Version=1.0
57 + Type=Link
58 + URL=file:///mnt/cdrom/docs/handbook/html/index.html
59 + Terminal=false
60 + Name=Gentoo Linux Handbook
61 + GenericName=Gentoo Linux Handbook
62 + Comment=This is a link to the local copy of the Gentoo Linux Handbook.
63 + Icon=text-editor
64 + EOF
65 + }
66 +
67 # Create our Handbook icon
68 [ -e /docs/handbook/index.html ] && create_handbook_icon
69 [ -n "${clst_livecd_overlay}" ] && [ -e ${clst_livecd_overlay}/docs/handbook/index.html ] && create_handbook_icon