aboutsummaryrefslogtreecommitdiffstats
path: root/split-passphrase
blob: 4712d597492a86a530e75a297b7cc92ac24d88e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

. ./config

mkdir -p "$partsdir"

$ssplit -x -t $nb_threshold -n $nb_shares < "$passphrase" > "$partsdir/all"

for num in `seq 1 $nb_shares`
do
    grep "^$num-" "$partsdir/all" > "$partsdir/$num"
done

rm -f "$partsdir/all"
rm -f "$passphrase"