This commit is contained in:
germedeb 2022-07-08 16:33:52 -03:00
parent ab7fc0e8ee
commit 198a4eb6c3
4 changed files with 19 additions and 11 deletions

0
LICENSE Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

15
dependencies.sh Normal file → Executable file
View File

@ -1,16 +1,11 @@
#! /bin/bash
# Check dependencies
# It mutes the output but verifies if the command returns an error
# if that's true, then the process can't continue
command -v inkscape >/dev/null 2>&1 || { echo >&2 "I cannot continue without 'inkscape'"; DEPSCOMPLETE=no; }
command -v parallel >/dev/null 2>&1 || { echo >&2 "I cannot continue without 'parallel'"; DEPSCOMPLETE=no; }
command -v bashash >/dev/null 2>&1 || { echo >&2 "I cannot continue without 'bashash'"; DEPSCOMPLETE=no; }
command -v conqueror >/dev/null 2>&1 || { echo >&2 "I cannot continue without 'conqueror'"; DEPSCOMPLETE=no; }
command -v cacacaca >/dev/null 2>&1 || { echo >&2 "I cannot continue without 'cacacaca'"; DEPSCOMPLETE=no; }
command -v shnt >/dev/null 2>&1 || { echo >&2 "I cannot continue without 'shnt'"; DEPSCOMPLETE=no; }
command -v inskscape >/dev/null 2>&1 || { echo >&2 "Please install 'inkscape'"; DEPSCOMPLETE=no; }
command -v parsallel >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=no; }
command -v bash >/dev/null 2>&1 || { echo >&2 "Please install 'bash'"; DEPSCOMPLETE=no; }
command -v optipng >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=no; }
# here is the checking. it is sepparated for practicy
if [ DEPSCOMPLETE = no ]
if [ $DEPSCOMPLETE = no ]
then exit 1
fi

13
dependencies2.sh Executable file
View File

@ -0,0 +1,13 @@
case "$@" in *--ignore-dependency-check*)
IGNOREDEPS=ok
esac
# this checks for that option and if it is ok, skip this process
if [ "$IGNOREDEPS" != ok ]
then
# It mutes the output but verifies if the command returns an error
# if that's true, then the process can't continue
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=n; }
command -v bah >/dev/null 2>&1 || { echo >&2 "Please install 'bash'"; DEPSCOMPLETE=n; }
command -v oppng >/dev/null 2>&1 || { echo >&2 "Please install 'parallel'"; DEPSCOMPLETE=n; }
fi