aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsergio <sergiotarxz@posteo.net>2026-09-15 23:18:57 +0200
committersergio <sergiotarxz@posteo.net>2026-09-15 23:18:57 +0200
commit9a7d96bf9068c6c02fdaed66c20983c764829d28 (patch)
tree5ebd59787840a1eec313307fe032e130e567499b
parente5d6a5226c1b4dc6deb669c0ef2f67de5b98f924 (diff)
Using sudo tee to create the binrepos referencev1.0.0-rc7
-rw-r--r--lib/AlgaOS/Updater/GUI.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AlgaOS/Updater/GUI.pm b/lib/AlgaOS/Updater/GUI.pm
index eb98813..678b60b 100644
--- a/lib/AlgaOS/Updater/GUI.pm
+++ b/lib/AlgaOS/Updater/GUI.pm
@@ -280,6 +280,10 @@ sub _update($self) {
system qw{rm -v /etc/portage/binrepos.conf/gentoo.conf};
{
open my $bin_fh, '>', '/etc/portage/binrepos.conf/algaos.conf';
+ open my $bin_fh, '|-',
+ qw{sudo tee /etc/portage/binrepos.conf/algaos.conf}
+ or die "open: $!";
+
say $bin_fh <<"EOF";
[algaos]
@@ -288,6 +292,8 @@ sync-uri = https://algaos.com/dist/@{[$self->_machine_id]}/binpkg
priority = 1
verify-signature = false
EOF
+
+ close $bin_fh or die "tee: $?";
}
if ( system qw{sudo emerge --noreplace --getbinpkg @world @system} ) {
exit 1;