diff --git a/Makefile b/Makefile deleted file mode 100644 index f2464c3..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - @printf "Nothing to make. Run \"make install\" instead.\n" - -install: - install -D -m744 src/omemo-qrcode-gen "/usr/local/bin/omemo-qrcode-gen" diff --git a/README.md b/README.md index 3ed5a32..cfb1df8 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,11 @@ Example: # This will put the string into stdout ./omemo-qrcode-gen bandie@example.com 9876543210 12345678 ABCDEF12 12345678 ABCDEF12 12345678 ABCDEF12 12345678 ABCDEF12 stdout ``` + +If you don't see your device ID's you can use `omemo-gen-get-devicelist-of` to copy paste it into an XMPP console. + +it will be like + +```console +# ./omemo-gen-get-devicelist-of +``` diff --git a/src/omemo-gen-get-devicelist-of b/src/omemo-gen-get-devicelist-of new file mode 100755 index 0000000..6f50af7 --- /dev/null +++ b/src/omemo-gen-get-devicelist-of @@ -0,0 +1,30 @@ +#!/bin/bash + +CONFIG_DIR="$HOME/.config" +CONFIG="$CONFIG_DIR/jabberdevlistscript" + +if ! [ -e "$CONFIG" ]; then + read -p "FROM is not set. Enter your Jabber ID: " FROM + mkdir -p $CONFIG_DIR + echo "FROM=$FROM" > $CONFIG + echo "If you want to change your FROM later, just edit or remove $CONFIG" +else + source $CONFIG +fi + +if [ -z "$1" ]; then + echo "$0: Missing argument." + echo "Usage: $0 [ Jabber ID of wished device list ]" + echo "Config file: $CONFIG" + exit 1 +fi + +echo "$CONFIG loaded." + +echo " + + + + + +"