all repos — dotfiles @ 8edf38e26ca4afebe6089b3a144fc9956c0f1b36

linux dotfiles

bin/misc/split_and_encrypt/decrypt.sh (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
#!/usr/bin/bash

passes=$(cat "$1")
prefix="$2"
path="$3"
i=0

[ -n "$path" ] && cd $3
mkdir "$2mp4"
for a in $passes
do
    echo $a > tmp_pas
    cat tmp_pas
    gpg --passphrase-file tmp_pas --batch -o "$2mp4/$prefix$i.mp4" -d "$prefix$i.g"
    i=$(expr $i + 1)
done;