File: split-use

package info (click to toggle)
gfsecret 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,964 kB
  • sloc: sh: 5,079; ansic: 3,118; makefile: 41; sed: 16
file content (29 lines) | stat: -rw-r--r-- 579 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash

set -e

uri1="${AUTOPKGTEST_TMP}/uri1"
uri2="${AUTOPKGTEST_TMP}/uri2"
uri3="${AUTOPKGTEST_TMP}/uri3"
mkdir $uri1 $uri2 $uri3

config="${AUTOPKGTEST_TMP}/config"

echo "Creating test file"
testfile="${AUTOPKGTEST_TMP}/testfile"
echo -n "test content" > $testfile
cat $testfile
echo
echo

echo "Splitting test file"
gfsec-split -c $config $testfile "file://$uri1/secret" "file://$uri2/secret" "file://$uri3/secret"
echo

echo "Checking file is removed"
! test -e $testfile
echo

echo "Combining shares"
gfsec-use -c $config -k
grep -q 'test content' $testfile