From b624330ae426709b780398f8401266c584d49c43 Mon Sep 17 00:00:00 2001 From: ferreo Date: Sun, 4 Aug 2024 17:31:26 +0200 Subject: [PATCH] Update main.sh --- main.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index bc80592..a908d2f 100755 --- a/main.sh +++ b/main.sh @@ -13,7 +13,15 @@ git clone https://github.com/pop-os/cosmic-settings.git cd cosmic-settings # Get build deps -sed -E 's/(^|,)[[:space:]]*(cargo|rustc|rust-all)([[:space:]]*,|[[:space:]]*$)//g; s/,[[:space:]]*$//' ./debian/control > ./debian/control.tmp && mv ./debian/control.tmp ./debian/control +awk ' +BEGIN { RS=""; ORS="\n\n"; FS="\n"; OFS="\n" } +{ + if ($1 ~ /^Build-Depends:/) { + gsub(/(^|,)[[:space:]]*(cargo|rustc|rust-all)([[:space:]]*,|[[:space:]]*$)/, "", $1) + gsub(/,[[:space:]]*$/, "", $1) + } + print +}' ./debian/control > ./debian/control.tmp && mv ./debian/control.tmp ./debian/control apt-get build-dep ./ -y apt-get install curl -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/root/.cargo sh -s -- -y