From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BA1AE138359 for ; Wed, 21 Oct 2020 00:24:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D356E0AB0; Wed, 21 Oct 2020 00:24:47 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1637DE0AB0 for ; Wed, 21 Oct 2020 00:24:47 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id a200so402106pfa.10 for ; Tue, 20 Oct 2020 17:24:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OOl721YfdDKJUq6bHQCD6lakMKL78dZaVHR5ZUJHRu8=; b=lpkt6U8boAlhIJfjGwESVxL4qJ+v/L3qksc/g0vBGsyqxPlFlNYYt8BJJ/+nlbUhMI aGnYSle1Jk5EqCvmVR/EE5+iOlYdJwaylLmTF9ZOfSJBZrsrZ1UJTxGDF8Fjnsf48cmx A+Z0TO8go/WwLZw6xg0rk3n9HcWnu/iGdceqUAmxsK5VSWyXe10AVyefsQDUDXP4MGV2 3gh2KXtdnU2QC+nUhdTWy+FnejMKi10jP1HuVe4b1z4svogkKKRjQF9CaypPTZhssoCA nAUSBsHJ7f2tSlZj9AEbSnn9OyuqyZOfOlzv6EGZXxg5Rgo0Zy8pI6VyGM2ubZpFmmMq nOGw== X-Gm-Message-State: AOAM531PXecfx4xzSYQdXR0xdRiBqjRHypY6wKPlqxHPhR2f0N6ixHQD jG2vPovOq7IWgXq6RtJNiq+ADm+GvRQU4Q== X-Google-Smtp-Source: ABdhPJya9BxSUYeaavbce6TjA9FzJVPw+eSZN+bhCZTN3IFB8q9/295b1OKSlvb65pPiWEEIK8wa7g== X-Received: by 2002:a62:d082:0:b029:15d:6943:e137 with SMTP id p124-20020a62d0820000b029015d6943e137mr583391pfg.77.1603239885542; Tue, 20 Oct 2020 17:24:45 -0700 (PDT) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id l3sm246823pju.28.2020.10.20.17.24.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 17:24:44 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 28/37] targets: Move create_handbook_icon() to its use Date: Tue, 20 Oct 2020 17:23:35 -0700 Message-Id: <20201021002344.378131-28-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201021002344.378131-1-mattst88@gentoo.org> References: <20201021002344.378131-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 68712abb-1a32-4613-9a26-3adbe759ee7f X-Archives-Hash: 01524ac757b6ffdcef5c555f851cb88f And use <<- so we can indent the heredoc properly. Signed-off-by: Matt Turner --- 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