aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-02-03 19:29:58 +0000
committerNicolas Vigier <boklm@mageia.org>2011-02-03 19:29:58 +0000
commita0fe7791d7a2efdbb210869ab567c76c1bb01a36 (patch)
tree3ea9d0cbbac3d58cfb98bf7b66a415e585274d09
parent3331de3df3e2c08bba6843b1f17e71bc40d62a5a (diff)
downloadgpg-a0fe7791d7a2efdbb210869ab567c76c1bb01a36.tar
gpg-a0fe7791d7a2efdbb210869ab567c76c1bb01a36.tar.gz
gpg-a0fe7791d7a2efdbb210869ab567c76c1bb01a36.tar.bz2
gpg-a0fe7791d7a2efdbb210869ab567c76c1bb01a36.tar.xz
gpg-a0fe7791d7a2efdbb210869ab567c76c1bb01a36.zip
add script to move part of secret
-rwxr-xr-xmove-part31
1 files changed, 31 insertions, 0 deletions
diff --git a/move-part b/move-part
new file mode 100755
index 0000000..6b71eff
--- /dev/null
+++ b/move-part
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+. ./config
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: $0 [part_number] [dest_dir]" 1>&2
+ exit 1
+fi
+
+partnum="$1"
+destdir="$2"
+
+if ! [ -f "$partsdir/$partnum" ]
+then
+ echo "Part $partnum doesn't exist."
+ exit 1
+fi
+
+if ! [ -d "$destdir" ]
+then
+ echo "Destination dir $destdir does not exist."
+ exit 1
+fi
+
+mkdir -p "$destdir/private"
+
+cp -a "$PUBDIR" "$destdir/"
+mv "$partsdir/$partnum" "$destdir/private/mageia-board-$partnum"
+cp -p "$seckey_e" "$destdir/private/"
+