all repos — dotfiles @ dd2db8ae42d358267a4fcdc13fa096d431d0d08d

linux dotfiles

bin/misc/split_and_encrypt/encrypt.sh

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

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

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