Update main.sh

This commit is contained in:
ferreo 2024-08-04 17:31:26 +02:00
parent bd0672700a
commit b624330ae4

10
main.sh
View File

@ -13,7 +13,15 @@ git clone https://github.com/pop-os/cosmic-settings.git
cd cosmic-settings cd cosmic-settings
# Get build deps # 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 build-dep ./ -y
apt-get install curl -y apt-get install curl -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/root/.cargo sh -s -- -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/root/.cargo sh -s -- -y