From 615483d81f017f721a69e934ea5f7ab4662c1b17 Mon Sep 17 00:00:00 2001 From: nappex Date: Sun, 18 Feb 2024 21:40:35 +0100 Subject: [PATCH] Simplify code --- xfce_desktop.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xfce_desktop.sh b/xfce_desktop.sh index 4090b5a..c45adba 100644 --- a/xfce_desktop.sh +++ b/xfce_desktop.sh @@ -15,9 +15,8 @@ if test ! -f $LOCAL_REPO_CONFIG_FILE then mkdir -p $(dirname $LOCAL_REPO_CONFIG_FILE) - echo "FreeBSD: {" >$LOCAL_REPO_CONFIG_FILE - sed 's/quarterly",/latest"/' >>$LOCAL_REPO_CONFIG_FILE - echo "}" >>$LOCAL_REPO_CONFIG_FILE + latest_url=$(grep -F "quarterly" /etc/pkg/FreeBSD.conf | sed 's/quarterly",/latest"/') + echo "FreeBSD: { $latest_url }" >$LOCAL_REPO_CONFIG_FILE else echo Backup and remove your configuration file \'"$LOCAL_REPO_CONFIG_FILE"\' echo and run this script again.