2023-03-18 04:17:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# . CONFIG.sh
|
|
|
|
|
|
|
|
# set -o xtrace ## To debug scripts
|
|
|
|
# set -o errexit ## To exit on error
|
|
|
|
# set -o errunset ## To exit if a variable is referenced but not set
|
|
|
|
|
|
|
|
|
|
|
|
function main() {
|
|
|
|
call_path=`pwd`
|
|
|
|
path=""
|
|
|
|
|
|
|
|
if [[ ! "${1::1}" == /* ]]; then
|
|
|
|
path="${call_path}/${1}"
|
|
|
|
else
|
|
|
|
path="${1}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# NOTE: Remove if you want to pass file(s) besides directories...
|
2023-03-26 06:07:35 +00:00
|
|
|
if [ ! -f "${path}" ]; then
|
|
|
|
echo "Newton: Path given not a file..."
|
2023-03-18 04:17:38 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "/opt/"
|
2023-03-24 03:56:20 +00:00
|
|
|
python /opt/newton.zip "$@"
|
2023-03-18 04:17:38 +00:00
|
|
|
}
|
|
|
|
main "$@";
|