Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SPSP
Transfer Tool
Commits
74034f58
Commit
74034f58
authored
Dec 17, 2019
by
Dillenn Terumalai
Browse files
Fixed recipient and added --always-trust param
parent
3aaf35f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
spsp
View file @
74034f58
...
...
@@ -15,7 +15,7 @@ COL_GREEN=${ESC_SEQ}"0;32m"
COL_MAGENTA
=
${
ESC_SEQ
}
"0;35m"
# Define the UID of the recipient for GPG encryption
RECIPIENT
=
"
dillenn.terumalai
@sib.swiss"
RECIPIENT
=
"
spsp-support
@sib.swiss"
# Check for the machine compatibility
...
...
@@ -110,7 +110,7 @@ signFile() {
encryptFile
()
{
message
=
"Encrypting file
${
COL_LGREEN
}
$1
${
COL_RESET
}
..."
printf
"
$message
\n
"
$GPGCMD
-o
$1
.gpg
-e
-r
$RECIPIENT
$1
$GPGCMD
--yes
--always-trust
-o
$1
.gpg
-e
-r
$RECIPIENT
$1
message
=
"File is encrypted as
${
COL_LYELLOW
}
$1
.gpg
${
COL_RESET
}
!"
printf
"
$message
\n
"
}
...
...
@@ -173,7 +173,7 @@ if [ $# -gt 0 ]; then
chmod
+x spsp
echo
"SPSP: Importing SPSP public key for encryption protocol..."
$GPGCMD
--import
.pub
$GPGCMD
--import
--always-trust
.pub
echo
""
echo
"SPSP: Complete!"
...
...
@@ -213,14 +213,14 @@ if [ $# -gt 0 ]; then
if
[
!
-f
$LOGFILE
]
;
then
touch
$LOGFILE
fi
echo
"
=================================
"
echo
""
for
DIRECTORY
in
*
;
do
if
[
-d
"
$DIRECTORY
"
]
&&
[
$DIRECTORY
!=
$OUTBOX
]
&&
[
$DIRECTORY
!=
$SENT
]
&&
[
$DIRECTORY
!=
$LOGS
]
;
then
if
[
-f
$DIRECTORY
/
*
.fastq
*
]
&&
[
-f
$DIRECTORY
/
*
.xlsx
]
;
then
echo
"SPSP: Compressing
$DIRECTORY
folder..."
compressFolder
$DIRECTORY
&> /dev/null
echo
"SPSP: Sucessfully compressed!"
echo
"SPSP: Removing the source and moving the tar.gz to out
put
folder."
echo
"SPSP: Removing the source and moving the tar.gz to out
box
folder."
# rm -rf $DIRECTORY
mv
$DIRECTORY
.tar.gz ./outbox/.
else
...
...
@@ -230,7 +230,7 @@ if [ $# -gt 0 ]; then
fi
fi
done
echo
"
=================================
"
echo
""
for
FILE
in
./outbox/
*
;
do
if
[
-f
"
$FILE
"
]
;
then
echo
"SPSP: Signing
$FILE
using SHA-256 algorithm..."
...
...
@@ -261,7 +261,7 @@ if [ $# -gt 0 ]; then
exit
0
fi
done
echo
"
=================================
"
echo
""
echo
"SPSP: Process completed!"
# Compress a folder given as an input
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment