diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2019-02-22 21:43:45 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2019-02-22 21:43:45 +0000 |
commit | b577f65eedd59aecb2cb2d0b955614ff90ca4599 (patch) | |
tree | f9f5f537e7111160ddf93d587fe313f723a7e537 /lib/MGA/DrakISO/BuildISO.pm | |
parent | 3c7a7f31dd1a39b86f223974c969fcfc1aecdea4 (diff) | |
download | drakiso-b577f65eedd59aecb2cb2d0b955614ff90ca4599.tar drakiso-b577f65eedd59aecb2cb2d0b955614ff90ca4599.tar.gz drakiso-b577f65eedd59aecb2cb2d0b955614ff90ca4599.tar.bz2 drakiso-b577f65eedd59aecb2cb2d0b955614ff90ca4599.tar.xz drakiso-b577f65eedd59aecb2cb2d0b955614ff90ca4599.zip |
Allow user to select which checksums are generated and support sha3-512.
Diffstat (limited to 'lib/MGA/DrakISO/BuildISO.pm')
-rw-r--r-- | lib/MGA/DrakISO/BuildISO.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm index 2711e4c..eb89965 100644 --- a/lib/MGA/DrakISO/BuildISO.pm +++ b/lib/MGA/DrakISO/BuildISO.pm @@ -148,9 +148,11 @@ sub build_iso_image { ) or die "ERROR: unable to run xorrisofs\n"; run_("mgaiso-addmd5 $dest > /dev/null 2> /dev/null"); - run_("cd $build_dir && md5sum $iso_name > $iso_name.md5"); - run_("cd $build_dir && sha1sum $iso_name > $iso_name.sha1"); - run_("cd $build_dir && sha512sum $iso_name > $iso_name.sha512"); + my $checksums = $build->{media}{checksums}; + member('md5', @$checksums) and run_("cd $build_dir && md5sum $iso_name > $iso_name.md5"); + member('sha1', @$checksums) and run_("cd $build_dir && sha1sum $iso_name > $iso_name.sha1"); + member('sha2', @$checksums) and run_("cd $build_dir && sha512sum $iso_name > $iso_name.sha512"); + member('sha3', @$checksums) and run_("cd $build_dir && sha3-512sum $iso_name > $iso_name.sha3"); if (my $suffix = $build->get_set_suffix) { if (my ($prefix, $ext) = $dest =~ /(.*)(\.[^.]+)$/) { my $link = $prefix . $suffix . $ext; |