Skip to content

Commit

Permalink
v0.0.14: add checksums action
Browse files Browse the repository at this point in the history
- close #2
  • Loading branch information
Yann Büchau committed Jun 13, 2017
1 parent b316cef commit 1fe1852
Show file tree
Hide file tree
Showing 9 changed files with 293 additions and 51 deletions.
144 changes: 143 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,9 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
configure_vars
makefile_include
sha256sum_bin
sha1sum_bin
md5sum_bin
msgmerge_bin
msgfmt_bin
xgettext_bin
Expand Down Expand Up @@ -675,7 +678,10 @@ gettext_bin
gettextsh_bin
xgettext_bin
msgfmt_bin
msgmerge_bin'
msgmerge_bin
md5sum_bin
sha1sum_bin
sha256sum_bin'


# Initialize some variables set by options.
Expand Down Expand Up @@ -1320,6 +1326,10 @@ Some influential environment variables:
msgfmt_bin path to msgfmt
msgmerge_bin
path to msgmerge
md5sum_bin path to md5sum
sha1sum_bin path to sha1sum
sha256sum_bin
path to sha256sum
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Expand Down Expand Up @@ -2653,6 +2663,138 @@ test -n "$msgmerge_bin" || as_fn_error $? "no msgmerge (program) found" "$LINENO
# Extract the first word of "md5sum", so it can be a program name with args.
set dummy md5sum; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_md5sum_bin+:} false; then :
$as_echo_n "(cached) " >&6
else
case $md5sum_bin in
[\\/]* | ?:[\\/]*)
ac_cv_path_md5sum_bin="$md5sum_bin" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_md5sum_bin="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
md5sum_bin=$ac_cv_path_md5sum_bin
if test -n "$md5sum_bin"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $md5sum_bin" >&5
$as_echo "$md5sum_bin" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$md5sum_bin" || as_fn_error $? "no md5sum (program) found" "$LINENO" 5
# Extract the first word of "sha1sum", so it can be a program name with args.
set dummy sha1sum; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_sha1sum_bin+:} false; then :
$as_echo_n "(cached) " >&6
else
case $sha1sum_bin in
[\\/]* | ?:[\\/]*)
ac_cv_path_sha1sum_bin="$sha1sum_bin" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_sha1sum_bin="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
sha1sum_bin=$ac_cv_path_sha1sum_bin
if test -n "$sha1sum_bin"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sha1sum_bin" >&5
$as_echo "$sha1sum_bin" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$sha1sum_bin" || as_fn_error $? "no sha1sum (program) found" "$LINENO" 5
# Extract the first word of "sha256sum", so it can be a program name with args.
set dummy sha256sum; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_sha256sum_bin+:} false; then :
$as_echo_n "(cached) " >&6
else
case $sha256sum_bin in
[\\/]* | ?:[\\/]*)
ac_cv_path_sha256sum_bin="$sha256sum_bin" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_sha256sum_bin="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
sha256sum_bin=$ac_cv_path_sha256sum_bin
if test -n "$sha256sum_bin"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sha256sum_bin" >&5
$as_echo "$sha256sum_bin" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$sha256sum_bin" || as_fn_error $? "no sha256sum (program) found" "$LINENO" 5
# Check for Python modules
if test -z $PYTHON;
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ REQUIRE_PROG([gettext.sh],[gettextsh_bin],[gettext for shell])
REQUIRE_PROG([xgettext],[xgettext_bin],[program])
REQUIRE_PROG([msgfmt],[msgfmt_bin],[program])
REQUIRE_PROG([msgmerge],[msgmerge_bin],[program])
REQUIRE_PROG([md5sum],[md5sum_bin],[program])
REQUIRE_PROG([sha1sum],[sha1sum_bin],[program])
REQUIRE_PROG([sha256sum],[sha256sum_bin],[program])

# Check for Python modules
AX_PYTHON_MODULE(lxml,fatal,python3)
Expand Down
7 changes: 5 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
thunar-custom-actions (0.0.14) UNRELEASED; urgency=medium
thunar-custom-actions (0.0.14) unstable; urgency=medium

* include @python3_bin@ in uca-manip
* improve security: ask for overwriting permission
* revise tempfile system
* add checksums action

-- Yann Büchau <[email protected]> Sun, 11 Jun 2017 15:40:29 +0200
-- Yann Büchau <[email protected]> Tue, 13 Jun 2017 12:17:08 +0200

thunar-custom-actions (0.0.13) unstable; urgency=medium

Expand Down
65 changes: 45 additions & 20 deletions locale/de/LC_MESSAGES/thunar-custom-actions.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-13 10:28+0200\n"
"PO-Revision-Date: 2017-06-13 10:31+0200\n"
"POT-Creation-Date: 2017-06-13 12:22+0200\n"
"PO-Revision-Date: 2017-06-13 12:23+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de\n"
Expand All @@ -27,18 +27,17 @@ msgstr "Verschlüssele"
#: locale/tmp_only_uca_commands.sh:3 locale/tmp_only_uca_commands.sh:4
#: locale/tmp_only_uca_commands.sh:5 locale/tmp_only_uca_commands.sh:6
#: locale/tmp_only_uca_commands.sh:7 locale/tmp_only_uca_commands.sh:8
#: locale/tmp_only_uca_commands.sh:10 locale/tmp_only_uca_commands.sh:11
#: locale/tmp_only_uca_commands.sh:12
#: locale/tmp_only_uca_commands.sh:11 locale/tmp_only_uca_commands.sh:12
#: locale/tmp_only_uca_commands.sh:13
#, sh-format
msgid "overwrite $base?"
msgstr "$base überschreiben?"

#: locale/tmp_only_uca_commands.sh:1 locale/tmp_only_uca_commands.sh:2
#: locale/tmp_only_uca_commands.sh:3 locale/tmp_only_uca_commands.sh:4
#: locale/tmp_only_uca_commands.sh:5 locale/tmp_only_uca_commands.sh:6
#: locale/tmp_only_uca_commands.sh:7 locale/tmp_only_uca_commands.sh:8
#: locale/tmp_only_uca_commands.sh:10 locale/tmp_only_uca_commands.sh:11
#: locale/tmp_only_uca_commands.sh:12
#: locale/tmp_only_uca_commands.sh:7 locale/tmp_only_uca_commands.sh:11
#: locale/tmp_only_uca_commands.sh:12 locale/tmp_only_uca_commands.sh:13
#, sh-format
msgid "something went wrong copying the file $fileout over to $filefinalout."
msgstr "Etwas ist beim Kopieren der Datei $fileout nach $filefinalout schiefgegangen."
Expand Down Expand Up @@ -83,11 +82,21 @@ msgstr "Auf wie viel Prozent der Originalgröße skalieren?"
msgid "Scale to $SCALE percent"
msgstr "Skaliere auf $SCALE%"

#: locale/tmp_only_uca_commands.sh:8
#, sh-format
msgid "Select link location"
msgstr "Ort der Verknüpfung auswählen"

#: locale/tmp_only_uca_commands.sh:8
#, sh-format
msgid "The link name has to differ from the target file name."
msgstr "Der Name des Links muss von der zu verlinkenden Datei abweichen."

#: locale/tmp_only_uca_commands.sh:8
#, sh-format
msgid "Could not create link"
msgstr "Konnte den Link nicht erstellen"

#: locale/tmp_only_uca_commands.sh:9
#, sh-format
msgid "Determining file sizes"
Expand All @@ -98,7 +107,7 @@ msgstr "Ermittle Dateigrößen"
msgid "Size"
msgstr "Größe"

#: locale/tmp_only_uca_commands.sh:9
#: locale/tmp_only_uca_commands.sh:9 locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "Name"
msgstr "Name"
Expand All @@ -113,32 +122,51 @@ msgstr "Große Elemente"
msgid "Elements sorted by size"
msgstr "Elemente nach Größe sortiert"

#: locale/tmp_only_uca_commands.sh:9
#: locale/tmp_only_uca_commands.sh:9 locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "Double-click to open."
msgstr "Doppelklick zum öffnen."

#: locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "Determining checksums"
msgstr "Berechne Prüfsummen"

#: locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "MD5"
msgstr "MD5"

#: locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "SHA1"
msgstr "SHA1"

#: locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "SHA256"
msgstr "SHA256"

#: locale/tmp_only_uca_commands.sh:10
#, sh-format
msgid "Checksums"
msgstr "Prüfsummen"

#: locale/tmp_only_uca_commands.sh:11
#, sh-format
msgid "Converting to PDF"
msgstr "Konvertiere zu PDF"

#: locale/tmp_only_uca_commands.sh:11
#: locale/tmp_only_uca_commands.sh:12
#, sh-format
msgid "Concatenating PDFs"
msgstr "Füge PDFs zusammen"

#: locale/tmp_only_uca_commands.sh:12
#: locale/tmp_only_uca_commands.sh:13
#, sh-format
msgid "Optimizing PDF"
msgstr "Optimiere PDF"

#~ msgid "select link location"
#~ msgstr "Ort der Verknüpfung auswählen"

#~ msgid "could not create link"
#~ msgstr "konnte den Link nicht erstellen"

#~ msgid "size"
#~ msgstr "Größe"

Expand Down Expand Up @@ -508,9 +536,6 @@ msgstr "Optimiere PDF"
#~ msgid "Device file '{}' does not exist."
#~ msgstr "Gerätedatei '{}' existiert nicht."

#~ msgid "Checksum error"
#~ msgstr "Prüfsummenfehler"

#~ msgid "(never mind if {}"
#~ msgstr "(egal, wenn '{}'"

Expand Down
13 changes: 8 additions & 5 deletions m4/tuca.m4.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ define(<~TUCA_PANDOC~>,<~@pandoc_bin@~>)dnl
define(<~TUCA_PYTHON3~>,<~@python3_bin@~>)dnl
define(<~TUCA_GETTEXT~>,<~@gettext_bin@~>)dnl
define(<~TUCA_GETTEXTSH~>,<~@gettextsh_bin@~>)dnl
define(<~TUCA_MD5SUM~>,<~@md5sum_bin@~>)dnl
define(<~TUCA_SHA1SUM~>,<~@sha1sum_bin@~>)dnl
define(<~TUCA_SHA256SUM~>,<~@sha256sum_bin@~>)dnl
dnl metadata from ./configure
define(<~TUCA_PACKAGE_NAME~>,<~@PACKAGE_NAME@~>)dnl
dnl paths from ./configure
Expand Down Expand Up @@ -194,9 +197,9 @@ file $TUCA_OUT_VAR() over to $TUCA_FINAL_OUT_VAR().));dnl
fi) dnl
~>)dnl
dnl
dnl TUCA_LOOP(command,[description],[outfile])
dnl TUCA_LOOP(command,[description])
dnl - loop over TUCA_ALL_FILES
dnl - execute "command" on each file with TUCA_CREATE_FILE
dnl - execute "command" on each file
dnl - use TUCA_PROGRESSBAR_TEXT to show "description" followed by the current
dnl file
dnl - use TUCA_PROGRESSBAR_PERCENTAGE to show current progress
Expand All @@ -211,9 +214,9 @@ dnl calculate current percentage
dnl get
TUCA_FILE_BASE_VAR()=$(basename TUCA_FILE());dnl current file's basename
dnl update progressbar text
TUCA_PROGRESSBAR_TEXT($2 ... TUCA_FILE_BASE());dnl
dnl run command on TUCA_FILE, save to TUCA_FILE if "outfile" is unspecified
TUCA_CREATE_FILE($1,TUCA_FILE(),ifelse($3,,TUCA_FILE(),$3));dnl
TUCA_PROGRESSBAR_TEXT($2 ... <~~>TUCA_FILE_BASE());dnl
dnl run command
($1);dnl
dnl update progressbar percentage
TUCA_PROGRESSBAR_PERCENTAGE($PERCENTAGE);dnl
done<~~>dnl
Expand Down
Loading

0 comments on commit 1fe1852

Please sign in to comment.