-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts changes #747
Scripts changes #747
Conversation
Also remove temporary resized, uploaded file. Other minor changes.
Added check for missing directory. Remove unnecessary code (every other script assumes $EXTENSION exists). Removed unneeded "cd $ALLSKY_HOME". Set defaults in one place so it's easier to remove them in the future when we know they are in the unified configuration file. Misc minor changes.
Didn't handle incorrect arguments very well, e.g.: `generateForDay.sh -t` would say "-t not found`.
scripts/copy_notification_image.sh
Outdated
RET=$? | ||
|
||
# If we created a temporary copy, delete it. | ||
[ "${RESIZE_UPLOADS}" = "true" ] && rm -f "${IMAGE_TO_USE}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this contains ${ALLSKY_TMP}/${FULL_FILENAME}
, but let's use the expanded version ( as I provided it here ), instead of ${IMAGE_TO_USE}
. This helps eliminate confusion during future code reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@linuxkidd, not sure I understand your comment. Almost all the scripts use ${IMAGE_TO_USE}
as the name of the current image being processed. This makes it easier to change locations of the file (like putting in in $ALLSKY_TMP in the near future) since only one line per script needs to change.
What do you mean by "as I provided it here"? I only see a few lines of newly added code in your reply that removes a temporary file.
IMGDIR is the old name; changed to use new name IMAGE_DIR.
Using IMAGE_TO_USE for the temporary file was confusing and dangerous. It now uses TEMP_FILE for the uploaded file being resized.
Misc fixes and changes.