Skip to content

Commit

Permalink
Merge pull request #2367 from drgrice1/bugfix/opl-update
Browse files Browse the repository at this point in the history
Fix the OPL-update script (or really the download-OPL-metadata-release.pl script)
  • Loading branch information
Alex-Jordan authored Mar 22, 2024
2 parents 264b4ac + 313be00 commit ed95d47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/download-OPL-metadata-release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ BEGIN

my $arch = Archive::Tar->new($releaseFile);
die "An error occurred while creating the tar file: $releaseFile" unless $arch;
$arch->setcwd($path);
$arch->extract();
$arch->setcwd($ce->{webworkDirs}{tmp});
$arch->extract;
die "There was an error extracting the metadata release: $arch->error" if $arch->error;

die "The downloaded archive did not contain the expected files."
unless -e "$ce->{webworkDirs}{tmp}/webwork-open-problem-library";

# Copy the json files into htdocs.
for (glob("$ce->{webworkDirs}{tmp}/webwork-open-problem-library/JSON-SAVED/*.json")) {
copy($_, "$ce->{webworkDirs}{htdocs}/DATA/") or die "Copy $_ to $ce->{webworkDirs}{htdocs}/DATA/ failed: $!";
Expand Down

0 comments on commit ed95d47

Please sign in to comment.