8 [ "x${PASS}" = "x" ] && die "you must set PASS to the password"
12 if [[ "${FILE}" = *.nc ]]; then
13 BASE_FILE="$(dirname ${FILE})/$(basename ${FILE} .nc)"
14 if [ -e "${BASE_FILE}" ]; then
15 echo "Not decrypting $FILE because there is already a ${BASE_FILE}"
17 if openssl enc -d -aes-256-ecb \
18 -k "$PASS" < "${FILE}" > "${BASE_FILE}"; then
19 echo "Created ${BASE_FILE}"
21 echo "Failed to create ${BASE_FILE}"
26 echo "Not decrypting $FILE because its name does not end in .nc"