BradleyA/markit

Feature Request --> check-markit- reduce business risk by defining unique temporary directory names

BradleyA opened this issue · 1 comments

Tell us about your feature request:
A clear and concise description of what you want to happen or the change you would like to see. Use a use case to describe how a person would actually use your request to accomplish a goal. Thank you.

-> To reduce business risk of more than one user/account/process using check-markit on the same system at same time by defining unique temporary directory names.  Future automation will require non-shared temporary directories and files by multiple users/accounts/processes.

How are you currently working without your feature request?
A description of any alternative solutions or features you've considered or are using today.

-> Currently it is a low business risk of multiple users/accounts/processes sharing a single system resource, directory because only one user is using check-markit.

    **Version:**
  • OS ( lsb_release -a ; Ubuntu 14.04 Ubuntu 16.04 Ubuntu 20.04 )

    -> Ubuntu
    
  • Command: ( check-markit 4.1.4.803 2020-08-29T22:25:47.061044-05:00 (CDT) https://github.com/BradleyA/markit.git master uadmin )

    -> check-markit  4.1.4.803  2020-08-29T22:25:47.061044-05:00 (CDT)  https://github.com/BradleyA/markit.git  master
    
     $ grep '/tmp/' /usr/local/bin/* | grep -i markit
grep: /usr/local/bin/amd64: Is a directory
/usr/local/bin/check-markit:  REPOSITORY_COMMAND="curl \-L ${REPOSITORY_COMMAND}/tarball | tar --directory /tmp/markit-temp -xzf - "
/usr/local/bin/check-markit:  REPOSITORY_COMMAND="curl \-L ${REPOSITORY_COMMAND}${REPOSITORY_PROJECT_NAME}-master.tar.gz | tar --directory /tmp/markit-temp -xzf - "
/usr/local/bin/check-markit:  REPOSITORY_COMMAND=$(echo "curl \-L ${REPOSITORY_COMMAND}/get/master.zip -o /tmp/markit-temp/master.zip ; unzip -qq /tmp/markit-temp/master.zip -d /tmp/markit-temp/")
/usr/local/bin/check-markit:#    Check if /tmp/markit-temp directory exists; remove it because of previous use of script failed
/usr/local/bin/check-markit:if [[ -d /tmp/markit-temp ]] ; then
/usr/local/bin/check-markit:        rm -rf /tmp/markit-temp
/usr/local/bin/check-markit:mkdir /tmp/markit-temp
/usr/local/bin/check-markit:REPOSITORY_FILE_NAME_LOCATION=$(find /tmp/markit-temp -type f -name "${FILE_NAME}" -print)
/usr/local/bin/check-markit:cp -f "${REPOSITORY_FILE_NAME_LOCATION}" /tmp/"${FILE_NAME}"
/usr/local/bin/check-markit:rm -rf /tmp/markit-temp
/usr/local/bin/check-markit:echo    "Repository copy placed in /tmp/${FILE_NAME}"