updated build.sh: Added and completed all the features I wanted.
This commit is contained in:
parent
0382e6c258
commit
4154e2c07f
@ -9,14 +9,14 @@ reset_colors="\e[0m" # this resets the coloring
|
|||||||
# Check dependencies
|
# Check dependencies
|
||||||
# It mutes the output but verifies if the command returns an error
|
# It mutes the output but verifies if the command returns an error
|
||||||
# if that's true, then the process can't continue
|
# if that's true, then the process can't continue
|
||||||
command -v inkscape >/dev/null 2>&1 || { echo >&2 "Please install 'inkscape'"; DEPSCOMPLETE=no; }
|
command -v inkscape >/dev/null 2>&1 || { echo >&2 "Please install 'inkscape'"; DEPSCOMPLETE=n; }
|
||||||
command -v parallel >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=no; }
|
command -v parallel >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=n; }
|
||||||
command -v bash >/dev/null 2>&1 || { echo >&2 "Please install 'bash'"; DEPSCOMPLETE=no; }
|
command -v bash >/dev/null 2>&1 || { echo >&2 "Please install 'bash'"; DEPSCOMPLETE=n; }
|
||||||
command -v optipng >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=no; }
|
command -v optipng >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=n; }
|
||||||
|
|
||||||
# here is the checking. it is sepparated for practicy
|
# here is the checking. it is sepparated for practicy
|
||||||
if [ DEPSCOMPLETE = no ]
|
if [ "$DEPSCOMPLETE" = n ]
|
||||||
then exit 1
|
then exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for --help
|
# Check for --help
|
||||||
@ -50,7 +50,7 @@ case "$@" in *-r*|*--restart*|*--again*|*--from-cero*)
|
|||||||
RESTART=yes
|
RESTART=yes
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $RESTART = yes ]
|
if [ "$RESTART" = yes ]
|
||||||
|
|
||||||
# this deletes the build directory
|
# this deletes the build directory
|
||||||
then printf "${info_color}cleaning up the build directory...${reset_colors}\\n"
|
then printf "${info_color}cleaning up the build directory...${reset_colors}\\n"
|
||||||
@ -88,7 +88,7 @@ case "$@" in *--avoid-optipng*|*--no-optipng*)
|
|||||||
OPTIPNG=avoid
|
OPTIPNG=avoid
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $OPTIPNG != avoid ];
|
if [ "$OPTIPNG" != avoid ];
|
||||||
then printf "${info_color}Using optipng to reduce the size of the build...${reset_colors}\\n"
|
then printf "${info_color}Using optipng to reduce the size of the build...${reset_colors}\\n"
|
||||||
./tasks/opticall.sh
|
./tasks/opticall.sh
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user