diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/dependencies.sh b/dependencies.sh old mode 100644 new mode 100755 index 9b845ed..fc37c59 --- a/dependencies.sh +++ b/dependencies.sh @@ -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 ] -then exit 1 +if [ $DEPSCOMPLETE = no ] + then exit 1 fi diff --git a/dependencies2.sh b/dependencies2.sh new file mode 100755 index 0000000..43713e3 --- /dev/null +++ b/dependencies2.sh @@ -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