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

Update the readme and the stphg script

parent 9834d84a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -59,6 +59,8 @@ Pour cela:
```bash
cd matrix-stickers
./stpkg -install
# ou pour une installation avec sshfs (cf "Utilisation de stpkg")
./stpkg -install -sshfs nomAAAA@perso.iiens.net -local ~/mnt/perso
```
4. Se connecter à Element. Utiliser la commande `/devtools` dans n'importe quel tchat.
![devtools](screenshots/screen_devtools.png)
......@@ -219,3 +221,9 @@ Les commandes de `stpkg` :
utiliser les options `-sshfs <ssh address> -local <point de montage locale>`.
Veillez noter que si vous utilisez l'option `-sshfs`, l'option `folder`
pointera sur un dossier *sur perso*.
Voici un exemple d'installation avec sshfs, où votre repo est sur votre ordi et
les stickers sur perso :
```bash
./stpkg -install -sshfs nomAAAA@perso.iiens.net -local ~/mnt/perso
```
......@@ -2,7 +2,6 @@
STPKG_CONF_FILE=~/.config/stpkg.sh
BASE_DIR="$PWD"
DISPLAY_DEPS_NOTES="yes"
# Detect install
if [ "x$1" = "x-install" ]; then
......@@ -38,11 +37,42 @@ die() {
exit 1
}
# Be paranoid
REQUIREMENTS=""
require() {
local __cmd=`which $1`
[ $? -ne 0 ] && die "Failed to find the '$1' command"
alias $1=$__cmd
REQUIREMENTS="$1 $REQUIREMENTS"
}
require column
require uuidgen
require convert
require montage
require identify
require python
require curl
require sed
require tr
require git
require sponge
require ls
require find
require jq
require chmod
__grep=`which egrep`
if [ $? -ne 0 ]; then
__grep=`which grep`
[ $? -ne 0 ] && die "Failed to find 'grep' or 'egrep'"
warn "Cound not find 'grep', will use 'egrep 'instead"
fi
alias grep=$__grep
# Source conf file, may have the sshfs hook
[ -f $STPKG_CONF_FILE ] && source $STPKG_CONF_FILE
if [ "x$STPKG_NO_MSG" = "xyes" ]; then
error() { return 0; }
# Do not silence errors
warn() { return 0; }
info() { return 0; }
fi
......@@ -92,27 +122,18 @@ cat << EOF
path is ~/html/stickerpicker. This command will give you a STPKG_INSTALL
and a STPKG_BASE env that you must put in your bashrc for the rest of the
stpkg commands to work.
EOF
if [ "x$DISPLAY_DEPS_NOTES" = "xyes" ]; then
cat << EOF
`__bold Requirements:`
The stpkg command requires 'jq' and 'egrep'. If 'egrep' is not found,
'grep' will be used. 'git' is obviously required, but if you are using this
repo you should have clone it so it's ok.
EOF
fi
Here is a list of all the requirements:
$REQUIREMENTS
EOF
exit 0
}
require() {
local __cmd=`which $1`
[ $? -ne 0 ] && die "Failed to find the '$1' command"
alias $1=$__cmd
}
slugify() {
echo "$1" | \
iconv -c -t ascii//TRANSLIT | \
......@@ -125,23 +146,6 @@ default_index() {
\"packs\": [ \"scalar-privacy_pam.json\" ] }"
}
# Be paranoid
require column
require uuidgen
require convert
require montage
require identify
require python
require curl
require sed
require tr
require git
require sponge
require ls
require find
require jq
require chmod
################################
# The special install function #
################################
......@@ -197,6 +201,8 @@ fi
EOF
# Do the sshfs hook
[ -f "$MNT" ] && die "The destination mount pount already exists"
mkdir "$MNT"
mountpoint $MNT >/dev/null 2>&1
[ $? -eq 0 ] && die "The '$MNT' folder is already a mountpoint"
sshfs $SSHFS: $MNT || die "Failed to mount $SSHFS:~/ to $MNT"
......@@ -250,15 +256,6 @@ if [ "x$STPKG_BASE" = "x" ]; then
"It should have been given by the install script"
fi
__grep=`which egrep`
if [ $? -ne 0 ]; then
__grep=`which grep`
[ $? -ne 0 ] && die "Failed to find 'grep' or 'egrep'"
warn "Cound not find 'grep', will use 'egrep 'instead"
fi
alias grep=$__grep
DISPLAY_DEPS_NOTES="no"
#########################
# Cmd handler functions #
#########################
......
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