commit: 909ae81f02afa15b535e349c86e8bbb8beea0af1
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:47:34 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=909ae81f
targets: Move create_handbook_icon() to its use
And use <<- so we can indent the heredoc properly.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
targets/support/chroot-functions.sh | 14 --------------
targets/support/livecdfs-update.sh | 15 +++++++++++++++
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/targets/support/chroot-functions.sh
b/targets/support/chroot-functions.sh
index 307a9042..22340023 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,20 +303,6 @@ show_debug() {
fi
}
-create_handbook_icon() {
- # This function creates a local icon to the Gentoo Handbook
- echo "[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Link
-URL=file:///mnt/cdrom/docs/handbook/html/index.html
-Terminal=false
-Name=Gentoo Linux Handbook
-GenericName=Gentoo Linux Handbook
-Comment=This is a link to the local copy of the Gentoo Linux Handbook.
-Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
-}
-
readonly locales="
C.UTF8 UTF-8
"
diff --git a/targets/support/livecdfs-update.sh
b/targets/support/livecdfs-update.sh
index 557d990b..47dbb5b3 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -243,6 +243,21 @@ case ${clst_livecd_type} in
# Clear out lastlog
rm -f /var/log/lastlog && touch /var/log/lastlog
+ create_handbook_icon() {
+ cat <<-EOF >
/usr/share/applications/gentoo-handbook.desktop
+ [Desktop Entry]
+ Encoding=UTF-8
+ Version=1.0
+ Type=Link
+
URL=file:///mnt/cdrom/docs/handbook/html/index.html
+ Terminal=false
+ Name=Gentoo Linux Handbook
+ GenericName=Gentoo Linux Handbook
+ Comment=This is a link to the local copy of the
Gentoo Linux Handbook.
+ Icon=text-editor
+ EOF
+ }
+
# Create our Handbook icon
[ -e /docs/handbook/index.html ] && create_handbook_icon
[ -n "${clst_livecd_overlay}" ] && [ -e
${clst_livecd_overlay}/docs/handbook/index.html ] && create_handbook_icon