mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-26 21:07:58 +01:00
Merge pull request #89 from Flowdalic/pgpainless-cli
[pgpainless-sop] Add ./pgpainless bash wrapper script
This commit is contained in:
commit
0a9781d8c8
2 changed files with 20 additions and 6 deletions
|
@ -6,16 +6,12 @@ PGPainless-SOP is an implementation of the [Stateless OpenPGP Command Line Inter
|
|||
To build an executable, `gradle jar` should be sufficient. The resulting jar file can be found in `pgpainless-sop/build/libs/`.
|
||||
|
||||
## Execute
|
||||
You can now use the jar file like described in the stateless OpenPGP cli document.
|
||||
|
||||
An example call may look like this:
|
||||
```
|
||||
java -jar pgpainless-sop-X.X.X.jar generate-key "Alice <alice@wonderland.lit>"
|
||||
```
|
||||
Simply use the provided `./pgpainless` script to execute PGPainless' Stateless Command Line Interface.
|
||||
|
||||
To discover all commands use
|
||||
```
|
||||
java -jar pgpainless-sop-X.X.X.jar help
|
||||
./pgpainless help
|
||||
```
|
||||
|
||||
Enjoy!
|
||||
|
|
18
pgpainless-sop/pgpainless
Executable file
18
pgpainless-sop/pgpainless
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Pretty fancy method to get reliable the absolute path of a shell
|
||||
# script, *even if it is sourced*. Credits go to GreenFox on
|
||||
# stackoverflow: http://stackoverflow.com/a/12197518/194894
|
||||
pushd . > /dev/null
|
||||
SCRIPTDIR="${BASH_SOURCE[0]}";
|
||||
while([ -h "${SCRIPTDIR}" ]); do
|
||||
cd "`dirname "${SCRIPTDIR}"`"
|
||||
SCRIPTDIR="$(readlink "`basename "${SCRIPTDIR}"`")";
|
||||
done
|
||||
cd "`dirname "${SCRIPTDIR}"`" > /dev/null
|
||||
SCRIPTDIR="`pwd`";
|
||||
popd > /dev/null
|
||||
|
||||
BASEDIR="$(cd ${SCRIPTDIR}/.. && pwd)"
|
||||
|
||||
exec "${BASEDIR}/gradlew" run --quiet --args="${@}"
|
Loading…
Reference in a new issue