8 if [[ "x${PASS}" = "x" ]]; then
9 read -s -p "enter password: " PASS
14 if [[ "${FILE}" = *.nc ]]; then
15 BASE_FILE="$(dirname ${FILE})/$(basename ${FILE} .nc)"
16 if [ -e "${BASE_FILE}" ]; then
17 echo "Not decrypting $FILE because there is already a ${BASE_FILE}"
19 if openssl enc -d -aes-256-ecb \
20 -k "$PASS" < "${FILE}" > "${BASE_FILE}"; then
21 echo "Created ${BASE_FILE}"
23 echo "Failed to create ${BASE_FILE}"
28 echo "Not decrypting $FILE because its name does not end in .nc"