Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
matrix-stickers
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Elliu
matrix-stickers
Validations
871cdf3e
Valider
871cdf3e
rédigé
2 years ago
par
Elliu
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Typos
parent
ea6aaf98
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
stpkg
+8
-9
8 ajouts, 9 suppressions
stpkg
avec
8 ajouts
et
9 suppressions
stpkg
+
8
−
9
Voir le fichier @
871cdf3e
...
@@ -99,7 +99,7 @@ cat << EOF
...
@@ -99,7 +99,7 @@ cat << EOF
`__bold Flags:`
`__bold Flags:`
`__yellow "-e"` / `__yellow "-ne"` The pack is enabled / disabled
`__yellow "-e"` / `__yellow "-ne"` The pack is enabled / disabled
`__yellow "-p"` / `__yellow "-np"` The pack is present / not present in the sticker repo
`__yellow "-p"` / `__yellow "-np"` The pack is present / not present in the sticker repo
`__yellow "-t"` Matrix user token
`__yellow "-t"` Matrix user token
, let empty to fill it on stdin
`__yellow "-dl"` Specify a folder to dl, may exists or not
`__yellow "-dl"` Specify a folder to dl, may exists or not
`__bold Configuration variables from
$(
echo
'~/.config/stpkg.sh'
)
:`
`__bold Configuration variables from
$(
echo
'~/.config/stpkg.sh'
)
:`
...
@@ -118,7 +118,7 @@ cat << EOF
...
@@ -118,7 +118,7 @@ cat << EOF
`__bold Requirements:`
`__bold Requirements:`
The stpkg command requires `__italic
$(
__yellow
'egrep'
)
`. If `__italic
$(
__yellow
'egrep'
)
` is not found, `__italic
$(
__yellow
'grep'
)
` will be
The stpkg command requires `__italic
$(
__yellow
'egrep'
)
`. If `__italic
$(
__yellow
'egrep'
)
` is not found, `__italic
$(
__yellow
'grep'
)
` will be
used instead. Here is a list of all the requirements:
used instead. Here is a list of all the requirements
(that should be checked automatically)
:
$REQUIREMENTS
$REQUIREMENTS
EOF
EOF
exit
0
exit
0
...
@@ -149,7 +149,7 @@ validate_token() {
...
@@ -149,7 +149,7 @@ validate_token() {
validate_homeserv
()
{
validate_homeserv
()
{
curl
"https://
$STPKG_HOMESERV
"
>
/dev/null 2>&1
curl
"https://
$STPKG_HOMESERV
"
>
/dev/null 2>&1
[
$?
-ne
0
]
&&
die
"Homeserver '
$STPKG_HOMESERV
' doesn't exist or is inacessible"
[
$?
-ne
0
]
&&
die
"Homeserver '
$STPKG_HOMESERV
' doesn't exist or is inac
c
essible"
}
}
file_get_width
()
{
file_get_width
()
{
...
@@ -477,7 +477,7 @@ __display() {
...
@@ -477,7 +477,7 @@ __display() {
fi
fi
local
FILE
=
"
${
STPKG_INSTALL
}
web/packs/
$1
.json"
local
FILE
=
"
${
STPKG_INSTALL
}
web/packs/
$1
.json"
[
!
-r
"
$FILE
"
]
&&
die
"Pack '
$1
' is not available (check with 'pack list'). The correspon
fi
g file should be '
$FILE
'"
[
!
-r
"
$FILE
"
]
&&
die
"Pack '
$1
' is not available (check with 'pack list'). The correspon
din
g file should be '
$FILE
'"
echo
"Display the sticker pack
$(
__green
`
jq
'.title'
<
"
$FILE
"
`
)
:"
echo
"Display the sticker pack
$(
__green
`
jq
'.title'
<
"
$FILE
"
`
)
:"
local
FIRST
=
"yes"
local
FIRST
=
"yes"
...
@@ -676,7 +676,7 @@ __pack() {
...
@@ -676,7 +676,7 @@ __pack() {
fi fi
fi fi
local
PACK_NAME
=
`
slugify
$PACK_NAME
`
local
PACK_NAME
=
`
slugify
$PACK_NAME
`
info
"Will pack the folder '
$PACK_FOLDER
' into '
$PACK_NAME
'"
info
"Will pack the folder '
$PACK_FOLDER
' into '
$PACK_NAME
'"
[
!
-d
"
$PACK_FOLDER
"
]
&&
die
"Source folder '
$PACK_FOLDER
' doesn't ex
s
it"
[
!
-d
"
$PACK_FOLDER
"
]
&&
die
"Source folder '
$PACK_FOLDER
' doesn't exi
s
t"
# Check packs
# Check packs
local
DEST_FOLDER
=
"
$STPKG_BASE
/packs/
$PACK_NAME
"
local
DEST_FOLDER
=
"
$STPKG_BASE
/packs/
$PACK_NAME
"
...
@@ -755,10 +755,6 @@ __pack() {
...
@@ -755,10 +755,6 @@ __pack() {
info
"Pack created, you can now commit it and create a MR to share it with other users"
info
"Pack created, you can now commit it and create a MR to share it with other users"
}
}
######################
# Parse command line #
######################
__do_command
()
{
__do_command
()
{
case
"
$1
"
in
case
"
$1
"
in
show|update|list|add|del|default|pack|display|edit
)
show|update|list|add|del|default|pack|display|edit
)
...
@@ -813,6 +809,9 @@ __do_command() {
...
@@ -813,6 +809,9 @@ __do_command() {
$*
$*
}
}
######################
# Parse command line #
######################
[
"x
$1
"
=
"x"
]
&&
usage
[
"x
$1
"
=
"x"
]
&&
usage
case
"
$1
"
in
case
"
$1
"
in
show
)
__do_command show
;;
show
)
__do_command show
;;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter