And use <<- so we can indent the heredoc properly.

Signed-off-by: Matt Turner <matts...@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
-- 
2.26.2


Reply via email to