Skip to content
Extraits de code Groupes Projets
Valider 0d06ef4e rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Update readme and delete no more necessary install script

parent fa30d22d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -9,6 +9,7 @@ Salon d'aide : `##sticker:iiens.net`
- [Avoir un meilleur stickerpicker](#user-content-avoir-un-meilleur-stickerpicker)
- [Utiliser un pack de sticker du dépôt](#user-content-utiliser-un-pack-de-sticker)
- [Créer des packs de stickers](#user-content-créer-des-packs-de-stickers)
- [Utilisation de stpkg](#utilisation-de-stpkg)
## Utiliser le stickerpicker d'un ami
Si vous avez des amis ayant déjà leur propre stickerpicker, il est possible de le réutiliser.
......@@ -54,10 +55,10 @@ Pour cela:
```bash
git clone https://git.iiens.net/Tigriz/matrix-stickers.git
```
3. Se déplacer dans le dépôt et exécuter le script install.sh
3. Se déplacer dans le dépôt et exécuter le script `stpkg`
```bash
cd matrix-stickers
./install.sh
./stpkg --install
```
4. Se connecter à Element. Utiliser la commande `/devtools` dans n'importe quel tchat.
![devtools](screenshots/screen_devtools.png)
......@@ -200,13 +201,15 @@ La commande `stpkg` a besoin des executables `egrep` (ou `grep` si indisponible)
`sponge` et `jq`. Il faut donc les installer ou les recompiler sur votre machine
(`apt install moreutils jq grep`).
> Il faut avoir utiliser le script `install.sh` et bien mettre les variables
> Il faut avoir utiliser le script `stpkg` et bien mettre les variables
`STPKG_BASE` et `STPKG_INSTALL` dans votre bashrc pour que `stpkg` fonctionne.
After using the `install.sh` script you can place the `stpkg` script in your path.
Après avoir utilisé `stpkg --install`, vous pouvez placer le script `stpkg`
dans votre path ou créer un alias pour l'exécuter facilement.
Les commandes de `stpkg` :
- `stpkg --install [dossier d'installation]`
- `stpkg update`
- `stpkg list [-e -p -np] [bash regex]`
- `stpkg list [-e -p -np] [regex bash]`
- `stpkg add <pack>`
- `stpkg del <pack>`
#!/bin/bash
BASE_DIR="$PWD"
die() {
error $*
cd $PWD # Go to initial directory
exit 1
}
error() { echo -ne '\e[31m'$*'\e[39m\n'; }
warn() { echo -ne '\e[33m'$*'\e[39m\n'; }
info() { echo -ne '\e[32m'$*'\e[39m\n'; }
# Clone the stickerpicker into the html repository
cd ~/html >/dev/null 2>&1 \
|| warn "Could not cd to '~/html', will clone to '$PWD/stickerpicker'"
if [ -d stickerpicker ]; then
# Fetch & rebase => update
info "The stickerpicker is already installed, update it"
LOCATION_OPT='--git-dir=stickerpicker/.git --work-tree=stickerpicker'
git $LOCATION_OPT fetch || die "Failed to fetch from sticker repo"
git $LOCATION_OPT rebase || die "Faield to rebase... what did you do to your master branch?"
else
# Install
info "The stickerpicker is not installed, install it to $PWD/stickerpicker"
git clone https://github.com/maunium/stickerpicker.git stickerpicker \
|| die "Failed to git clone the stickerpicker project." \
"If you already installed stickerpicker, remove it or use the 'stpkg' command"
fi
# Initialize the stickerpicker with the pack
# scalar-privacy_pam.json
cd stickerpicker || die "Could not cd to '$PWD/stickerpicker'"
cp packs/* web/packs || die "Failed to cp packs to '$PWD/web/packs'"
cd web/packs || die "Failed to cd to '$PWD/web/packs'"
cat > index.json << EOF
{
"homeserver_url": "https://matrix.iiens.net",
"packs": [
"scalar-privacy_pam.json"
]
}
EOF
[ ! -f index.json ] && die "Failed to create the $PWD/index.json file"
info "Created index.json in '$PWD'"
STPKG_BASE=$BASE_DIR
STPKG_INSTALL=`realpath $PWD/../../`
info 'You may add the following lines in your bashrc file:'
echo "export STPKG_INSTALL='$STPKG_INSTALL'"
echo "export STPKG_BASE='$STPKG_BASE'"
# Go to initial directory
cd $BASE_DIR
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter