unidata / nexus-tools Goto Github PK
View Code? Open in Web Editor NEWA set of shell scripts to manage publications within raw repositories on the Unidata nexus artifacts server.
License: BSD 3-Clause "New" or "Revised" License
A set of shell scripts to manage publications within raw repositories on the Unidata nexus artifacts server.
License: BSD 3-Clause "New" or "Revised" License
Shellcheck returns some warnings and errors. I can't capture the syntax highlight, so the high-priority issues are presented first, followed by the verbose output.
I can try to address these after I get the release out, but I wanted to record the issues while I was looking at it.
First issue:
In nexus-upload.sh line 133:
if [[ ! " ${VALID_VALUES_ARRAY[@]} " =~ " ${VALUE_TO_VALIDATE} " ]]; then
^--------------------------^ SC2199: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
^----------------------^ SC2076: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
Second issue:
In nexus-upload.sh line 204:
for F in ${EXPRESSION[@]}; do
^--------------^ SC2068: Double quote array expansions to avoid re-splitting elements.
In nexus-upload.sh line 111:
VALID_RAW_REPO_TYPES=( "docs" "downloads" )
^------------------^ SC2034: VALID_RAW_REPO_TYPES appears unused. Verify use (or export if used externally).
In nexus-upload.sh line 112:
VALID_PROJECTS=( "idv" "ldm" "netcdf-c" "netcdf-cxx" "netcdf-fortran"
^------------^ SC2034: VALID_PROJECTS appears unused. Verify use (or export if used externally).
In nexus-upload.sh line 133:
if [[ ! " ${VALID_VALUES_ARRAY[@]} " =~ " ${VALUE_TO_VALIDATE} " ]]; then
^--------------------------^ SC2199: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
^----------------------^ SC2076: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
In nexus-upload.sh line 200:
read -sp 'Please enter your artifacts server password: ' PASSWORD </dev/tty
^--^ SC2162: read without -r will mangle backslashes.
In nexus-upload.sh line 204:
for F in ${EXPRESSION[@]}; do
^--------------^ SC2068: Double quote array expansions to avoid re-splitting elements.
In nexus-upload.sh line 220:
UPLOAD_OPT="--upload-file "${F}" "${URL}""
^--^ SC2027: The surrounding quotes actually unquote this. Remove or escape them.
^----^ SC2027: The surrounding quotes actually unquote this. Remove or escape them.
In nexus-upload.sh line 225:
OUTPUT=$(${CURL_COMMAND} -u "${USERNAME}":"${PASSWORD}" ${UPLOAD_OPT} 2> /dev/null) || RETURN_CODE=$?
^-----------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
OUTPUT=$(${CURL_COMMAND} -u "${USERNAME}":"${PASSWORD}" "${UPLOAD_OPT}" 2> /dev/null) || RETURN_CODE=$?
In nexus-upload.sh line 231:
HTTP_STATUS_CODE=$(echo "${OUTPUT}" | sed -e 's/.*\httpcode=//')
^-- SC2001: See if you can use ${variable//search/replace} instead.
For more information:
https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
https://www.shellcheck.net/wiki/SC2199 -- Arrays implicitly concatenate in ...
https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u...
Enable recursive upload for subdirectories.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.