From 198a4eb6c358836fa15f06ad491f93fa5dd24875 Mon Sep 17 00:00:00 2001 From: germedeb Date: Fri, 8 Jul 2022 16:33:52 -0300 Subject: [PATCH] heh xd --- LICENSE | 0 README.md | 0 dependencies.sh | 17 ++++++----------- dependencies2.sh | 13 +++++++++++++ 4 files changed, 19 insertions(+), 11 deletions(-) mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 dependencies.sh create mode 100755 dependencies2.sh 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