| git.druid.rocks | index | druid520 | mp | src/ | unmask.pl |
src/unmask.pl
#!/usr/bin/env perl
use v5.16;
use strict;
use warnings FATAL => 'all';
use FindBin;
use lib "$FindBin::Bin";
use mplib::config qw($CFG set_pkgconf);
use mplib::util qw(fail ok confirm bare_name);
use mplib::resolve qw(init);
my $flags = mplib::config::parse_flags(\@ARGV);
mplib::config::load($flags);
fail("unmask needs a package name") unless @ARGV;
init();
my $canon = bare_name($ARGV[0]);
confirm("unmask: $canon -- continue?");
set_pkgconf($canon, 'MASK', undef);
ok("$canon unmasked persistently (this is separate from 'mp install --unmask', a "
. "one-invocation override -- that flag still works exactly as before regardless of this)");