8 [ "x${SALT}" = "x" ] && die "you must set SALT to the salt."
9 [ "x${PASS}" = "x" ] && die "you must set PASS to the password"
13 if [[ "${FILE}" = *.nc ]]; then
14 BASE_FILE="$(dirname ${FILE})/$(basename ${FILE} .nc)"
15 if [ -e "${BASE_FILE}" ]; then
16 echo "Not decrypting $FILE because there is already a ${BASE_FILE}"
18 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"