Mercurial > sat_docs
annotate scripts/test_accounts/create_accounts.sh @ 138:274af514a5cf
flatpak: reworked packages + made a building script:
a new `build_manifest.py` script can now be used to generate flatpak manifests for every frontend of SàT.
The manifest can be used both for development versions and stable ones.
Templates files (in the form `_tmp_<app-id>.json`) are used to set building instructions.
A common runtime specific to SàT has been abandoned following a discussion on the official mailing list.
A small wrapper is now used to launch backend automatically if it's not found.
Desktop and app metadata have been added for Cagou.
Jp and Primitivus don't have appdata and desktop files yet.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 22 Jun 2019 15:59:07 +0200 |
parents | 4cd5475623eb |
children |
rev | line source |
---|---|
40
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
1 #!/bin/bash |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
2 |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
3 # This is a helping script to create some test accounts. XMPP passwords are |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
4 # retrieved from the DAT files in the data/<domain> directories, but you still |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
5 # need to copy these files to your prosody installation directory. |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
6 |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
7 # The provided data directory contains some test accounts for two differents |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
8 # domains (souliane.org and tazar.int), roster subscriptions and avatars. |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
9 |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
10 LIST=`jp profile list` |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
11 |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
12 for DIR in `ls data`; do |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
13 DOMAIN=`echo $DIR | sed s/%2e/./` |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
14 for FILE in `ls data/$DIR/accounts`; do |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
15 USER=`echo $FILE | sed s/.dat//` |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
16 JID=$USER@$DOMAIN |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
17 PASSWD=`cat data/$DIR/accounts/$FILE | grep "\"password\"" | cut -d "\"" -f 4` |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
18 echo -n Creating account for $JID... |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
19 if [[ $LIST =~ $USER ]]; then |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
20 echo -n removing existing account first... |
47
36d158a50c8a
fixes script for creating test accounts
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
21 jp profile delete $USER |
40
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
22 fi |
47
36d158a50c8a
fixes script for creating test accounts
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
23 jp profile create $USER -j $JID -p $PASSWD |
40
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
24 echo OK |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
25 done |
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
26 done |
122
4cd5475623eb
scripts (launcher, test_accounts): update
souliane <souliane@mailoo.org>
parents:
47
diff
changeset
|
27 cp -r data/* ~/workspace/prosody-hg/data/ |