-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Nautilus-Cyberneering/issue-9-remove-tif-…
…files Remove base images after processing
- Loading branch information
Showing
5 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Find and copy Base images from data folder to public folder | ||
# Find and copy Base images from data folder to public folder. | ||
# If a parameter is passed, it will execute only the specified step. Else, all of them | ||
# will be executed sequentially. | ||
|
||
# TODO: use a domain app to extract the list of Base images. Remove magic numbers. | ||
|
||
# Show current Base images | ||
echo "Current Base images in website ..." | ||
find ./public/images -type f \( -iname \*42*.tif -o -iname \*42*.tiff \) | ||
if [[ ($1 == "") || ($1 == "show_website")]] | ||
then | ||
echo "Current Base images in website ..." | ||
find ./public/images -type f \( -iname \*42*.tif -o -iname \*42*.tiff \) | ||
fi | ||
|
||
# Find Base images | ||
echo "Find Base images in library ..." | ||
find ./library/data -type f \( -iname \*42*.tif -o -iname \*42*.tiff \) | ||
if [[ ($1 == "") || ($1 == "show_library")]] | ||
then | ||
echo "Find Base images in library ..." | ||
find ./library/data -type f \( -iname \*42*.tif -o -iname \*42*.tiff \) | ||
fi | ||
|
||
# Remove all Base images from public folder | ||
echo "Removing Base images from public folder ..." | ||
find ./public/images -type f \( -iname \*42*.tif -o -iname \*42*.tiff \) -exec rm -f {} \; | ||
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 {} \; | ||
fi | ||
|
||
# Copy all Base images from library to public folder | ||
echo "Copying Base images to public folder ..." | ||
find ./library/data -type f \( -iname \*42*.tif -o -iname \*42*.tiff \) -exec cp -fv {} ./public/images \; | ||
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 \; | ||
fi |