Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet committed Nov 18, 2024
1 parent 18019b4 commit 79d0fc2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions scripts/migrations/2024_11_move_missing_opf_products.pl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@

sub move_product_dir_to_off ($dir, $dir2, $dir3, $dir4) {
# move .sto files
print STDERR "moving /srv/opf/products/other-flavors-codes/$dir$dir2$dir3$dir4 to /srv/off/products/$dir/$dir2/$dir3/$dir4\n";
print STDERR
"moving /srv/opf/products/other-flavors-codes/$dir$dir2$dir3$dir4 to /srv/off/products/$dir/$dir2/$dir3/$dir4\n";
#ensure_dir_created_or_die("/srv/off/products/$dir/$dir2/$dir3");
# if there is an existing off directory for this product, move it to deleted-off-products-codes-replaced-by-other-flavors
if (0 and -e "/srv/off/products/$dir/$dir2/$dir3/$dir4") {
Expand All @@ -115,8 +116,14 @@ ($dir, $dir2, $dir3, $dir4)
}
}
# move the directory to /srv/off/products
if (dirmove("/srv/opf/products/other-flavors-codes/$dir$dir2$dir3$dir4", "/srv/off/products/$dir/$dir2/$dir3/$dir4")) {
print STDERR "moved /srv/opf/products/other-flavors-codes/$dir$dir2$dir3$dir4 to /srv/off/products/$dir/$dir2/$dir3/$dir4\n";
if (
dirmove(
"/srv/opf/products/other-flavors-codes/$dir$dir2$dir3$dir4", "/srv/off/products/$dir/$dir2/$dir3/$dir4"
)
)
{
print STDERR
"moved /srv/opf/products/other-flavors-codes/$dir$dir2$dir3$dir4 to /srv/off/products/$dir/$dir2/$dir3/$dir4\n";
}
else {
print STDERR
Expand All @@ -130,7 +137,7 @@ ($dir, $dir2, $dir3, $dir4)
#ensure_dir_created_or_die("/srv/off/html/images/products/$dir/$dir2/$dir3");
# if there is an existing off directory for this product, move it to deleted-off-products-codes-replaced-by-other-flavors
if (0 and -e "/srv/off/html/images/products/$dir/$dir2/$dir3/$dir4") {
print STDERR "moving existing product images on OFF\n";
print STDERR "moving existing product images on OFF\n";
if (
dirmove(
"/srv/off/html/images/products/$dir/$dir2/$dir3/$dir4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ($dir, $dir2, $dir3, $dir4)
ensure_dir_created_or_die("/srv/off/html/images/products/$dir/$dir2/$dir3");
# if there is an existing off directory for this product, move it to deleted-off-products-codes-replaced-by-other-flavors
if (-e "/srv/off/html/images/products/$dir/$dir2/$dir3/$dir4") {
print STDERR "moving existing product images on OFF\n";
print STDERR "moving existing product images on OFF\n";
if (
dirmove(
"/srv/off/html/images/products/$dir/$dir2/$dir3/$dir4",
Expand Down

0 comments on commit 79d0fc2

Please sign in to comment.