starting to implement the verbose option

This commit is contained in:
germedeb 2022-08-16 16:52:39 -03:00
parent 3712186bf7
commit 6b394f69dd
1 changed files with 14 additions and 6 deletions

View File

@ -36,7 +36,7 @@ ${info_color}Examples:${reset_colors}
${info_color}Arguments:${reset_colors} ${info_color}Arguments:${reset_colors}
h -h --help help Show this help. h -h --help help Show this help.
e export Export the remaining icons e export Export the remaining icons
a avoid-optipng Don't launch optipng process o use-optipng Launch optipng process
v verbose Show more info. useful for debugging (NIY) v verbose Show more info. useful for debugging (NIY)
r from-cero restart Copy the SVG again and start the build again r from-cero restart Copy the SVG again and start the build again
i autoinstall Autoinstall to User directory i autoinstall Autoinstall to User directory
@ -48,6 +48,11 @@ See README and LICENSE for more information\\n"
exit 0; exit 0;
esac esac
# check if you written verbose and set that variable
case "$@" in *v*|*verbose*)
VERBOSE=yes
esac
# here is the checking. it is sepparated for practicy # here is the checking. it is sepparated for practicy
if [ "$DEPSCOMPLETE" = n ] if [ "$DEPSCOMPLETE" = n ]
then then
@ -115,11 +120,11 @@ if [ "$EXPOR" = yes ]; then
./tasks/export/export-animations.sh ./tasks/export/export-animations.sh
fi fi
case "$@" in *avoid-optipng*|*a*) case "$@" in *use-optipng*|*o*)
OPTIPNG=avoid OPTIPNG=use
esac esac
if [ "$OPTIPNG" != avoid ]; if [ "$OPTIPNG" = use ];
then then
command -v optipng >/dev/null 2>&1 || { echo >&2 "Missing dependency: optipng"; DEPSCOMPLETE=n; } command -v optipng >/dev/null 2>&1 || { echo >&2 "Missing dependency: optipng"; DEPSCOMPLETE=n; }
if [ "$DEPSCOMPLETE" = n ] ; then if [ "$DEPSCOMPLETE" = n ] ; then
@ -134,8 +139,11 @@ printf "${info_color}Launching misc commands...${reset_colors}\\n"
./tasks/misc.sh ./tasks/misc.sh
printf "${info_color}starting link process...${reset_colors}\\n" printf "${info_color}starting link process...${reset_colors}\\n"
./tasks/linkcall.sh if [ "$VERBOSE" = yes ] ; then
./tasks/linkcall.sh
else
./tasks/linkcall.sh >/dev/null 2>&1
fi
case "$@" in *autoinstall*|*i*) case "$@" in *autoinstall*|*i*)
printf "${info_color}Performing an Update/Installation of aleta${reset_colors}\\n" printf "${info_color}Performing an Update/Installation of aleta${reset_colors}\\n"
rm -rf ~/.icons/aleta rm -rf ~/.icons/aleta