Skip to content

Commit

Permalink
fix: [#28] change Base iamge purpose code in script
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Mar 3, 2022
1 parent 1ffacdc commit 2687676
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/sync-base-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@
if [[ ($1 == "") || ($1 == "show_website")]]
then
echo "Current Base images in website ..."
find ./public/images -type f \( -iname '*-42.*.jpg' -o -iname '*42.*.jpeg' \)
find ./public/images -type f \( -iname '*-52.*.jpg' -o -iname '*-52.*.jpeg' \)
fi

# Find Base images
if [[ ($1 == "") || ($1 == "show_library")]]
then
echo "Find Base images in library ..."
find ./library/data -type f \( -iname '*-42.*.tif' -o -iname '-42.*.tiff' \)
find ./library/data -type f \( -iname '*-52.*.tif' -o -iname '-52.*.tiff' \)
fi

# Remove all Base images from public folder
if [[ ($1 == "") || ($1 == "remove_base")]]
then
echo "Removing Base images from public folder ..."
find ./public/images -type f \( -iname '*-42.*.tif' -o -iname '*-42.*.tiff' \) -exec rm -f {} \;
find ./public/images -type f \( -iname '*-52.*.tif' -o -iname '*-52.*.tiff' \) -exec rm -f {} \;
fi

# Copy all Base images from library to public folder
if [[ ($1 == "") || ($1 == "copy")]]
then
echo "Copying Base images to public folder ..."
find ./library/data -type f \( -iname '*-42.*.tif' -o -iname '*-42.*.tiff' \) -exec cp -fv {} ./public/images \;
find ./library/data -type f \( -iname '*-52.*.tif' -o -iname '*-52.*.tiff' \) -exec cp -fv {} ./public/images \;
fi

0 comments on commit 2687676

Please sign in to comment.