#!/usr/bin/env bash

tmp_name="decrypted"

if [[ $# > 1 && $# < 4 ]]; then
    if [[ $# == 3 ]]; then
        tmp_name=$3
    fi

    echo $1 | gpg --no-tty --passphrase-fd 0 --decrypt $2 > tmp.zip
    python -m zipfile -e tmp.zip $tmp_name
    rm -f tmp.zip
fi




