infra-openafs-deb/debian/ConfigUtils.pm
Ian Wienand b08d522be7 Build jammy packages
This is an import of the infrastructure to make Jammy packages

Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/840788
Change-Id: Ie66d3b1e39ef9fa714b1dabdb7eb61cc43538587
2022-05-06 12:53:24 +10:00

27 lines
505 B
Perl

# This is -*- perl -*-
package Debian::OpenAFS::ConfigUtils;
use strict;
use vars qw( @ISA @EXPORT @unwinds);
@ISA = qw(Exporter);
require Exporter;
@EXPORT = qw(@unwinds run unwind);
sub run ($) {
print join(' ', @_);
print "\n";
system (@_) == 0
or die "Failed: $?\n";
}
# This subroutine takes a command to run in case of failure. After
# each succesful step, this routine should be run with a command to
# undo the successful step.
sub unwind($) {
push @unwinds, $_[0];
}
1;