|
1 | 1 | #!/usr/bin/env bash
|
2 | 2 | #
|
3 | 3 | # Jacksum File Browser Integration for Unix and GNU/Linux Operating Systems
|
4 |
| -# Copyright (c) 2006-2023 Dipl.-Inf. (FH) Johann N. Loefflmann |
| 4 | +# Copyright (c) 2006-2024 Dipl.-Inf. (FH) Johann N. Loefflmann |
5 | 5 | #
|
6 | 6 | # This program is free software; you can redistribute it and/or modify
|
7 | 7 | # it under the terms of the GNU General Public License as published by
|
|
34 | 34 | #
|
35 | 35 | # Dolphin 21.12.3 (KDE Framework 5.92) on Kubuntu 22.04
|
36 | 36 | #
|
| 37 | +# elementary Files 6.5.2 on elementary OS 7.1 |
37 | 38 | # elementary Files 6.2.1 on elementary OS 7
|
38 | 39 | #
|
39 | 40 | # GNOME Files (known as Gnome Nautilus) 42.6 on Ubuntu Linux 22.04.3
|
40 | 41 | # GNOME Files (known as Gnome Nautilus) 42.2 on Ubuntu Linux 22.04.1
|
41 | 42 | # GNOME Files (known as Gnome Nautilus) 42.1.1 on Ubuntu Linux 22.04
|
42 | 43 | # GNOME Files (known as Gnome Nautilus) 3.26.4 on Ubuntu Linux 18.04
|
43 | 44 | #
|
| 45 | +# Nemo 6.0.2 on Linux Mint 21.3 |
44 | 46 | # Nemo 5.2.4 on Ubuntu Linux 22.04.1
|
45 | 47 | # Nemo 5.2.4 on Ubuntu Linux 22.04
|
46 | 48 | #
|
|
98 | 100 | # on read-only-filesystems (e.g. on life CDs), crashes of kate, or non-supported
|
99 | 101 | # servicemenus for KDE
|
100 | 102 |
|
101 |
| -VERSION="2.5.0" |
| 103 | +VERSION="2.6.0" |
102 | 104 | NAME="jacksum"
|
103 | 105 | JACKSUM_VERSION="3.7.0"
|
104 |
| -HASHGARTEN_VERSION="0.14.0" |
| 106 | +HASHGARTEN_VERSION="0.16.0" |
105 | 107 | PROGNAME="Jacksum/HashGarten File Browser Integration"
|
106 | 108 | JACKSUM_JAR="$(pwd)/jacksum-${JACKSUM_VERSION}.jar"
|
107 | 109 | HASHGARTEN_JAR="$(pwd)/HashGarten-${HASHGARTEN_VERSION}.jar"
|
108 | 110 | ALGOS_DIRECT_SUGGESTION="cksum crc32 ed2k haval_256_5 md5 rmd160 sha1 sha256 sha3-256 sumbsd sumsysv whirlpool"
|
109 | 111 | ALGORITHMS=""
|
110 |
| -COMMANDS="cmd_calc;1)_Calc_hash_values cmd_check;2)_Check_data_integrity cmd_cust;3)_Customized_output cmd_edit;4)_Edit_script cmd_help;5)_Help" |
| 112 | +COMMANDS="cmd_calc;1)_Calc_hash_values cmd_check;2)_Check_data_integrity cmd_cust;3)_Customized_output cmd_edit;4)_Edit_script" |
111 | 113 |
|
112 | 114 | KDE_PROGNAME="Dolphin, Konqueror, or Krusader"
|
113 | 115 | GNOME_PROGNAME="GNOME Files (Nautilus)"
|
@@ -147,16 +149,16 @@ print_menu() {
|
147 | 149 | # $1 "install" or "uninstall"
|
148 | 150 | # -------------------------------------------------------------------------
|
149 | 151 | printf "Menu:\n"
|
150 |
| - printf " 1 - %-9s in %s for %s %s\n" "${ACTION^}" "$KDE_PROGNAME" "$USERS" "$KDE_DISABLED" |
151 |
| - printf " 2 - %-9s in %s for %s %s\n" "${ACTION^}" "$GNOME_PROGNAME" "$USERS" "$GNOME_DISABLED" |
152 |
| - printf " 3 - %-9s in %s for %s %s\n" "${ACTION^}" "$ROX_PROGNAME" "$USERS" "$ROX_DISABLED" |
153 |
| - printf " 4 - %-9s in %s for %s %s\n" "${ACTION^}" "$THUNAR_PROGNAME" "$USERS" "$THUNAR_DISABLED" |
154 |
| - printf " 5 - %-9s in %s for %s %s\n" "${ACTION^}" "$XFE_PROGNAME" "$USERS" "$XFE_DISABLED" |
155 |
| - printf " 6 - %-9s in %s for %s %s\n" "${ACTION^}" "$NEMO_PROGNAME" "$USERS" "$NEMO_DISABLED" |
156 |
| - printf " 7 - %-9s in %s for %s %s\n" "${ACTION^}" "$CAJA_PROGNAME" "$USERS" "$CAJA_DISABLED" |
157 |
| - printf " 8 - %-9s in %s for %s %s\n" "${ACTION^}" "$ELEMENTARY_PROGNAME" "$USERS" "$ELEMENTARY_DISABLED" |
158 |
| - printf " 9 - %-9s in %s for %s %s\n" "${ACTION^}" "$SPACEFM_PROGNAME" "$USERS" "$SPACEFM_DISABLED" |
159 |
| - printf " 10 - %-9s in %s for %s %s\n" "${ACTION^}" "$ZZZFM_PROGNAME" "$USERS" "$ZZZFM_DISABLED" |
| 152 | + printf " 1 - %-9s in %s for %s %s\n" "${ACTION}" "$KDE_PROGNAME" "$USERS" "$KDE_DISABLED" |
| 153 | + printf " 2 - %-9s in %s for %s %s\n" "${ACTION}" "$GNOME_PROGNAME" "$USERS" "$GNOME_DISABLED" |
| 154 | + printf " 3 - %-9s in %s for %s %s\n" "${ACTION}" "$ROX_PROGNAME" "$USERS" "$ROX_DISABLED" |
| 155 | + printf " 4 - %-9s in %s for %s %s\n" "${ACTION}" "$THUNAR_PROGNAME" "$USERS" "$THUNAR_DISABLED" |
| 156 | + printf " 5 - %-9s in %s for %s %s\n" "${ACTION}" "$XFE_PROGNAME" "$USERS" "$XFE_DISABLED" |
| 157 | + printf " 6 - %-9s in %s for %s %s\n" "${ACTION}" "$NEMO_PROGNAME" "$USERS" "$NEMO_DISABLED" |
| 158 | + printf " 7 - %-9s in %s for %s %s\n" "${ACTION}" "$CAJA_PROGNAME" "$USERS" "$CAJA_DISABLED" |
| 159 | + printf " 8 - %-9s in %s for %s %s\n" "${ACTION}" "$ELEMENTARY_PROGNAME" "$USERS" "$ELEMENTARY_DISABLED" |
| 160 | + printf " 9 - %-9s in %s for %s %s\n" "${ACTION}" "$SPACEFM_PROGNAME" "$USERS" "$SPACEFM_DISABLED" |
| 161 | + printf " 10 - %-9s in %s for %s %s\n" "${ACTION}" "$ZZZFM_PROGNAME" "$USERS" "$ZZZFM_DISABLED" |
160 | 162 | printf "\n"
|
161 | 163 | if [ "$ACTION" = "install" ]; then
|
162 | 164 | printf " u - Show the uninstall menu\n"
|
@@ -1217,7 +1219,7 @@ install_script_sh() {
|
1217 | 1219 | #!/bin/bash
|
1218 | 1220 | #
|
1219 | 1221 | # Jacksum File Browser Integration Script, https://jacksum.net
|
1220 |
| -# Copyright (c) 2006-2023 Johann N. Loefflmann, https://johann.loefflmann.net |
| 1222 | +# Copyright (c) 2006-2024 Johann N. Loefflmann, https://johann.loefflmann.net |
1221 | 1223 | # Code has been released under the conditions of the GPLv3+.
|
1222 | 1224 | #
|
1223 | 1225 |
|
@@ -1272,34 +1274,16 @@ case $ALGO in
|
1272 | 1274 |
|
1273 | 1275 | "cmd_calc")
|
1274 | 1276 | "${JAVA}" -jar "${HASHGARTEN_JAR}" --header -O relative -U ${ERROR_LOG} --file-list-format list --file-list ${FILE_LIST} --path-relative-to-entry 1 --verbose default,summary
|
1275 |
| - rm relative > /dev/null 2>&1 |
1276 |
| - if [ $? -eq 0 ] |
1277 |
| - then |
1278 |
| - # Generate an output that contains both stdout and stderr in a file for the viewer |
1279 |
| - # CHECK_FILE contains the output file name that the user has been specified at the GUI |
1280 |
| - |
1281 |
| - CHECK_FILE=$(grep gui.output $HOME/.HashGarten.properties) |
1282 |
| - # We need to strip the key called gui.output= and undo any escapes done by Java''s properties API |
1283 |
| - CHECK_FILE=${CHECK_FILE#*=} |
1284 |
| - |
1285 |
| - cat ${CHECK_FILE} ${ERROR_LOG} > ${OUTPUT} |
1286 |
| - viewer "${OUTPUT}" |
1287 |
| - fi |
1288 | 1277 | ;;
|
1289 | 1278 |
|
1290 | 1279 | "cmd_check")
|
1291 | 1280 | if [ ! -f relative ]; then
|
1292 | 1281 | touch relative
|
1293 | 1282 | fi
|
1294 | 1283 | "${JAVA}" -jar "${HASHGARTEN_JAR}" --header -c relative -O ${OUTPUT} -U ${OUTPUT} --file-list-format list --file-list ${FILE_LIST} --path-relative-to-entry 1 --verbose default,summary
|
1295 |
| - rm relative > /dev/null 2>&1 |
1296 |
| - if [ $? -eq 0 ]; then |
1297 |
| - viewer "${OUTPUT}" |
1298 |
| - fi |
1299 | 1284 | ;;
|
1300 | 1285 |
|
1301 | 1286 | "cmd_cust")
|
1302 |
| - cat /dev/null > "${OUTPUT}" |
1303 | 1287 | ALGOS="md5+sha1+ripemd160+tiger+\
|
1304 | 1288 | sha256+sha512/256+sha3-256+shake128+ascon-hash+sm3+streebog256+kupyna-256+lsh-256-256+blake3+k12+keccak256+\
|
1305 | 1289 | sha512+sha3-512+shake256+streebog512+kupyna-512+lsh-512-512+blake2b-512+keccak512+m14+skein-512-512+whirlpool"
|
@@ -1437,7 +1421,11 @@ print_params() {
|
1437 | 1421 | check_bin "Editor" "$EDIT"
|
1438 | 1422 | EDIT="$BIN"
|
1439 | 1423 |
|
1440 |
| - printf " [direct accessible algorithms]: %s\n\n" "$ALGORITHMS" |
| 1424 | + if [ -z $ALGORITHMS ]; then |
| 1425 | + printf " [direct accessible algorithms]: %s\n\n" "n/a" |
| 1426 | + else |
| 1427 | + printf " [direct accessible algorithms]: %s\n\n" "$ALGORITHMS" |
| 1428 | + fi |
1441 | 1429 | }
|
1442 | 1430 |
|
1443 | 1431 | # -------------------------------------------------------------------------
|
@@ -1467,6 +1455,7 @@ modify_params() {
|
1467 | 1455 | # -------------------------------------------------------------------------
|
1468 | 1456 | printf "\nA JDK or JRE is required. If you use a headless JDK/JRE, you cannot use HashGarten which is a GUI for Jacksum.\n"
|
1469 | 1457 | printf "You could go to https://adoptium.net for example to obtain a full JDK/JRE.\n"
|
| 1458 | + printf "On Debian based derivates you could install by 'sudo apt install default-jdk'\n" |
1470 | 1459 |
|
1471 | 1460 | enter_java
|
1472 | 1461 |
|
@@ -1666,14 +1655,14 @@ uninstall_generic() {
|
1666 | 1655 | # -------------------------------------------------------------------------
|
1667 | 1656 | init_editor() {
|
1668 | 1657 | # -------------------------------------------------------------------------
|
1669 |
| - find_app gedit kate defaulttexteditor xfwrite pluma io.elementary.code geany |
| 1658 | + find_app gedit kate defaulttexteditor xfwrite pluma io.elementary.code geany xed pluma |
1670 | 1659 | EDIT="$APP"
|
1671 | 1660 | }
|
1672 | 1661 |
|
1673 | 1662 | # -------------------------------------------------------------------------
|
1674 | 1663 | init_viewer() {
|
1675 | 1664 | # -------------------------------------------------------------------------
|
1676 |
| - find_app zenity gedit kate defaulttexteditor xfwrite pluma io.elementary.code geany |
| 1665 | + find_app zenity gedit kate defaulttexteditor xfwrite pluma io.elementary.code geany xed pluma |
1677 | 1666 | VIEWER="$APP"
|
1678 | 1667 | }
|
1679 | 1668 |
|
|
0 commit comments