Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 6419cc14 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Update help and show commands

parent c2478c6a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -49,8 +49,8 @@ require() { ...@@ -49,8 +49,8 @@ require() {
for CMD in $*; do for CMD in $*; do
local __cmd=`which $1` local __cmd=`which $1`
[ $? -ne 0 ] && die "Failed to find the '$1' command" [ $? -ne 0 ] && die "Failed to find the '$1' command"
alias $1=$__cmd alias $CMD=$__cmd
REQUIREMENTS="$1 $REQUIREMENTS" REQUIREMENTS="$CMD $REQUIREMENTS"
done done
} }
require \ require \
...@@ -95,15 +95,15 @@ usage() { ...@@ -95,15 +95,15 @@ usage() {
echo `__bold "$BASE_NAME usage:"` echo `__bold "$BASE_NAME usage:"`
BASE_NAME=`__green "$BASE_NAME"` BASE_NAME=`__green "$BASE_NAME"`
cat << EOF cat << EOF
$BASE_NAME -install `__yellow "[-sshfs 'username@server' -local mnt_point] [install_path]"` $BASE_NAME -install [`__yellow "-sshfs 'username@server' -local mnt_point"`] [`__yellow "install_path"`]
$BASE_NAME show $BASE_NAME show
$BASE_NAME help $BASE_NAME help
$BASE_NAME update $BASE_NAME update
$BASE_NAME list `__yellow "[-p -e -np] [bash_regex]"` $BASE_NAME list [`__yellow "-p -e -np"`] [`__yellow "bash_regex"`]
$BASE_NAME add|del `__yellow "<pack>"` $BASE_NAME add|del <`__yellow "pack"`>
$BASE_NAME pack `__yellow "[-t token] [name] <pack_folder>"` $BASE_NAME pack [`__yellow "-t token"`] [`__yellow "name"`] <`__yellow "pack_folder"`>
$BASE_NAME display `__yellow "[-dl folder] <pack_name> [sticker_regex]"` $BASE_NAME display [`__yellow "-dl folder"`] <`__yellow "pack_name"`> [`__yellow "sticker_regex"`]
$BASE_NAME edit `__yellow "<pack_name>"` add|del `__yellow "<sticker> [file]"` $BASE_NAME edit <`__yellow "pack_name"`> add|del <`__yellow "sticker"`> [`__yellow "file"`]
`__bold Flags:` `__bold Flags:`
`__yellow "-e"` / `__yellow "-ne"` The pack is enabled / disabled `__yellow "-e"` / `__yellow "-ne"` The pack is enabled / disabled
...@@ -120,14 +120,14 @@ cat << EOF ...@@ -120,14 +120,14 @@ cat << EOF
`__green STPKG_HOMESERV` [`__italic 'homeserv'`] The Matrix home server. [$(__yellow `__italic 'iiens.net'`)] `__green STPKG_HOMESERV` [`__italic 'homeserv'`] The Matrix home server. [$(__yellow `__italic 'iiens.net'`)]
`__bold Notes:` `__bold Notes:`
The `__italic "'stpkg -install [path]'"` must be called only once. The default install The `__italic "$(__yellow 'stpkg -install [path]')"` must be called only once. The default install
path is `__italic "'~/html/stickerpicker'"`. This command will give you a `__italic STPKG_INSTALL` path is `__italic "$(__yellow '~/html/stickerpicker')"`. This command will give you a `__italic $(__yellow STPKG_INSTALL)`
and a `__italic STPKG_BASE` env that you must put in your bashrc for the rest of the and a `__italic $(__yellow STPKG_BASE)` env that you must put in your bashrc for the rest of the
stpkg commands to work. stpkg commands to work.
`__bold Requirements:` `__bold Requirements:`
The stpkg command requires 'egrep'. If 'egrep' is not found, 'grep' will be The stpkg command requires `__italic $(__yellow 'egrep')`. If `__italic $(__yellow 'egrep')` is not found, `__italic $(__yellow 'grep')` will be
used. Here is a list of all the requirements: used instead. Here is a list of all the requirements:
$REQUIREMENTS $REQUIREMENTS
EOF EOF
exit 0 exit 0
...@@ -334,7 +334,7 @@ __show() { ...@@ -334,7 +334,7 @@ __show() {
if [ "x$STPKG_SSHFS" = "xyes" ]; then if [ "x$STPKG_SSHFS" = "xyes" ]; then
cat << EOF cat << EOF
`__bold stpkg with sshfs install:` `__bold stpkg with sshfs install:`
sshfs target is mounted: `[ -d $STPKG_INSTALL ] && __green 'yes' || __yellow 'no'` sshfs `[ -d $STPKG_INSTALL ] && __green 'mounted' || __yellow 'umounted'`
EOF EOF
fi fi
...@@ -358,7 +358,13 @@ cat << EOF ...@@ -358,7 +358,13 @@ cat << EOF
`__green STPKG_NO_MSG` `__italic $($COLOR_STNOMSG $STPKG_NO_MSG)` `__green STPKG_NO_MSG` `__italic $($COLOR_STNOMSG $STPKG_NO_MSG)`
`__green STPKG_HOMESERV` `__italic $STPKG_HOMESERV` `__green STPKG_HOMESERV` `__italic $STPKG_HOMESERV`
`__green STPKG_TOKEN` $TOKEN `__green STPKG_TOKEN` $TOKEN
`__bold aliased commands due to the '"require"' function:`
EOF EOF
for CMD in $REQUIREMENTS; do
echo -e " `__green $CMD` `which $CMD`"
done | sort | column -t | while IFS= read LINE; do
echo " $LINE"
done
} }
__update() { __update() {
......
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