From d6cec9e88ee8da064a78da007f28b5993458abe4 Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Fri, 17 May 2024 17:56:44 -0600 Subject: [PATCH] firmador --- 01-utils.sh | 23 +++++++++++++++++------ tests/shellcheck.sh | 5 +---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/01-utils.sh b/01-utils.sh index 30f6f6a..9bed27f 100644 --- a/01-utils.sh +++ b/01-utils.sh @@ -73,13 +73,22 @@ set_version() { } firmador_libre() { - FIRMADOR="https://firmador.libre.cr/firmador.jar" - DIR="$HOME/.local/share/firmador" - [ "$ID" = "macos" ] && DIR="$HOME/.local/share/firmador" +FIRMADOR="https://firmador.libre.cr/firmador.jar" +DIR="$HOME/.local/share/firmador" +[ "$ID" = "macos" ] && DIR="$HOME/.local/share/firmador" - mkdir -p "$DIR" - (cd "$DIR" && curl -O "$FIRMADOR") - # Add DESKTOP entry +mkdir -p "$DIR" +(cd "$DIR" && curl -O "$FIRMADOR") +FIRMADOR="$DIR/firmador.jar" + +printf '[Desktop Entry] +Name=Firmador +Comment=Herramienta para firmar documentos +Category=Utility +Exec=java -jar %s +Icon=%s/.local/share/firmador/firmador.png +Terminal=false +Type=Application' "$FIRMADOR" "$HOME" > ~/.local/share/applications/firmador.desktop } set_menu() { @@ -128,3 +137,5 @@ elif [ "$MENU" = "term" ] ; then fi } + +firmador_libre diff --git a/tests/shellcheck.sh b/tests/shellcheck.sh index f76ec88..39c3e53 100644 --- a/tests/shellcheck.sh +++ b/tests/shellcheck.sh @@ -1,6 +1,3 @@ #!/bin/sh -SCRIPT="$(grep 'SCRIPT *=' Makefile)" -SCRIPT="${SCRIPT#*=}" - -shellcheck -x --shell=sh --format=gcc "$SCRIPT" +shellcheck -x --shell=sh --format=gcc $@