generated from cosmic-packages/cosmic-applets
Update main.sh
This commit is contained in:
parent
8059d3a323
commit
3a6c1c0289
23
main.sh
23
main.sh
@ -13,26 +13,9 @@ git clone https://github.com/pop-os/cosmic-settings.git
|
|||||||
cd cosmic-settings
|
cd cosmic-settings
|
||||||
|
|
||||||
# Get build deps
|
# Get build deps
|
||||||
awk '
|
perl -0777 -pe '
|
||||||
BEGIN { RS=""; ORS="\n\n"; FS="\n"; OFS="\n" }
|
s/^(Build-Depends:\s*\n)(.+?)(\n\S)/$1 . join(",\n", grep { !/^\s*(cargo|rustc|rust-all)\s*$/ } split /,\s*\n/, $2) . $3/ems;
|
||||||
{
|
' ./debian/control > ./debian/control.tmp && mv ./debian/control.tmp ./debian/control
|
||||||
if ($1 ~ /^Build-Depends:/) {
|
|
||||||
split($1, parts, ":")
|
|
||||||
deps = parts[2]
|
|
||||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "", deps)
|
|
||||||
split(deps, items, ",")
|
|
||||||
new_deps = ""
|
|
||||||
for (i in items) {
|
|
||||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "", items[i])
|
|
||||||
if (items[i] != "cargo" && items[i] != "rustc" && items[i] != "rust-all") {
|
|
||||||
if (new_deps != "") new_deps = new_deps ", "
|
|
||||||
new_deps = new_deps items[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$1 = "Build-Depends:\n " new_deps
|
|
||||||
}
|
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user