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 conteneurs
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é GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Elliu
matrix-stickers
Validations
42be925d
Valider
42be925d
rédigé
Il y a 4 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Base stpkg script
parent
d875cc12
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
stpkg
+131
-0
131 ajouts, 0 suppression
stpkg
avec
131 ajouts
et
0 suppression
stpkg
0 → 100755
+
131
−
0
Voir le fichier @
42be925d
#!/bin/bash
BASE_DIR
=
"
$PWD
"
DISPLAY_DEPS_NOTES
=
"yes"
if
[
"x
$STPKG_COLORS
"
=
"x"
]
;
then
STPKG_COLORS
=
"yes"
error
()
{
echo
-ne
'\e[31m'
$*
'\e[39m\n'
>
/dev/stderr
;
}
warn
()
{
echo
-ne
'\e[33m'
$*
'\e[39m\n'
>
/dev/stderr
;
}
info
()
{
echo
-ne
'\e[32m'
$*
'\e[39m\n'
>
/dev/stderr
;
}
else
STPKG_COLORS
=
"no"
error
()
{
echo
'ERROR:'
$*
>
/dev/stderr
;
}
warn
()
{
echo
'WARN:'
$*
>
/dev/stderr
;
}
info
()
{
echo
'INFO:'
$*
>
/dev/stderr
;
}
fi
########################
# Some basic functions #
########################
__exit
()
{
cd
"
$BASE_DIR
"
exit
$1
}
usage
()
{
cat
<<
EOF
$0
usage:
$0
update
$0
list [egrep regex]
$0
get <pack>
$0
del <pack>
ENV variables:
STPKG_INSTALL The cloned stickerpicker project location. Defaut is ~/html/stickerpicker.
STPKG_BASE Where the sticker project is located.
STPKG_COLORS Use colors for output. Default is 'yes'.
The STPKG_INSTALL STPKG_BASE should have been given by the 'install.sh' script.
EOF
if
[
"x
$DISPLAY_DEPS_NOTES
"
=
"xyes"
]
;
then
cat
<<
EOF
Note:
$0
requires 'jq' and 'egrep'. If 'egrep' is not found, 'grep' will be used.
EOF
fi
__exit 0
}
die
()
{
error
$*
__exit 1
}
#########################
# Get some exec / paths #
#########################
if
[
"x
$STPKG_INSTALL
"
=
"x"
]
;
then
STPKG_INSTALL
=
"~/html/stickerpicker/"
[
!
-d
"
$STPKG_INSTALL
"
]
\
&&
die
"STPKG_INSTALL not specified but the default one (
$STPKG_INSTALL
) doesn't exist."
\
"Did you use the install script?"
else
info
"Use custom STPKG_INSTALL:
$STPKG_INSTALL
"
fi
__jq
=
`
which jq
`
[
$?
-ne
0
]
&&
die
"Failed to find the 'jq' command"
__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
DISPLAY_DEPS_NOTES
=
"no"
#########################
# Cmd handler functions #
#########################
__update
()
{
info
"Updating packs"
}
__list
()
{
if
[
"x
$*
"
=
"x"
]
;
then
REG
=
info
"List packs with no regex"
else
REG
=
"
$*
"
info
"List packs with regex:
$REG
"
fi
}
__get
()
{
[
"x
$1
"
=
"x"
]
&&
die
"You must specify a pack for the 'get' command"
info
"Enable pack '
$1
'"
}
__del
()
{
[
"x
$1
"
=
"x"
]
&&
die
"You must specify a pack 'del' command"
info
"Disable pack '
$1
'"
}
######################
# Parse command line #
######################
[
"x
$1
"
=
"x"
]
&&
usage
case
"
$1
"
in
update
)
__update
;;
list
)
shift
__list
"
$*
"
;;
get
)
shift
__get
$*
;;
del
)
shift
__del
$*
;;
esac
__exit 0
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