diff -Nru recoverjpeg-2.3/aclocal.m4 recoverjpeg-2.6/aclocal.m4 --- recoverjpeg-2.3/aclocal.m4 2014-03-05 13:38:14.000000000 +0000 +++ recoverjpeg-2.6/aclocal.m4 2015-10-11 17:04:07.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -103,15 +103,14 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -142,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -333,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -409,7 +408,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -499,8 +498,8 @@ # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -573,7 +572,11 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -602,7 +605,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -613,7 +616,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -623,7 +626,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -644,7 +647,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -694,7 +697,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,7 +736,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -762,7 +765,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -809,7 +812,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -828,7 +831,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -909,7 +912,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -969,7 +972,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -997,7 +1000,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1016,7 +1019,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru recoverjpeg-2.3/ChangeLog recoverjpeg-2.6/ChangeLog --- recoverjpeg-2.3/ChangeLog 2014-03-05 13:38:17.000000000 +0000 +++ recoverjpeg-2.6/ChangeLog 2015-10-11 17:04:10.000000000 +0000 @@ -1,3 +1,51 @@ +2015-10-11 Samuel Tardieu + + * configure.ac: Version 2.6 + +2015-10-11 Samuel Tardieu + + * Makefile.am: Fix #7: impossible rebuild without pandoc after + distclean + +2015-10-11 Samuel Tardieu + + * configure.ac: Version 2.5 + +2015-10-11 Samuel Tardieu + + * sort-pictures: Fix #8: sort-pictures always fail + +2015-09-22 Samuel Tardieu + + * .travis.yml: Fix typo in .travis.yml + +2015-09-22 Samuel Tardieu + + * configure.ac: Version 2.4 + +2015-09-22 Samuel Tardieu + + * recoverjpeg.md, recovermov.md, remove-duplicates.md, + sort-pictures.md: Update manual pages date + +2015-09-22 Samuel Tardieu + + * recoverjpeg.c, recoverjpeg.md, recovermov.cpp, recovermov.md, + utils.c, utils.h: Add the -o option as well as a note in the man + page This feature was requested by Katja W. + +2015-09-20 Samuel Tardieu + + * .travis.yml: Upgrade travis to container-based infrastructure + +2014-07-29 Samuel Tardieu + + * .travis.yml: Add Travis configuration file + +2014-03-11 Samuel Tardieu + + * recoverjpeg.c: Initialize integer with integer + 2014-03-05 Samuel Tardieu * configure.ac: Version 2.3 @@ -143,7 +191,7 @@ 2010-11-24 Samuel Tardieu - * README, README.md: Convert README to Markdown format + * README => README.md: Convert README to Markdown format 2010-03-06 Samuel Tardieu @@ -364,9 +412,9 @@ 2004-12-23 Samuel Tardieu - * COPYING, Makefile.am, README, recoverjpeg.1, sort-pictures, - sort-pictures.1, sort-pictures.sh: Add man pages and documentation - and rename sort-pictures.sh into sort-pictures + * COPYING, Makefile.am, README, recoverjpeg.1, sort-pictures.sh => + sort-pictures, sort-pictures.1: Add man pages and documentation and + rename sort-pictures.sh into sort-pictures 2004-12-23 Samuel Tardieu diff -Nru recoverjpeg-2.3/compile recoverjpeg-2.6/compile --- recoverjpeg-2.3/compile 2014-03-05 13:09:46.000000000 +0000 +++ recoverjpeg-2.6/compile 2015-09-21 22:22:34.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru recoverjpeg-2.3/configure recoverjpeg-2.6/configure --- recoverjpeg-2.3/configure 2014-03-05 13:38:15.000000000 +0000 +++ recoverjpeg-2.6/configure 2015-10-11 17:04:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for recoverjpeg 2.3. +# Generated by GNU Autoconf 2.69 for recoverjpeg 2.6. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -576,8 +576,8 @@ # Identity of this package. PACKAGE_NAME='recoverjpeg' PACKAGE_TARNAME='recoverjpeg' -PACKAGE_VERSION='2.3' -PACKAGE_STRING='recoverjpeg 2.3' +PACKAGE_VERSION='2.6' +PACKAGE_STRING='recoverjpeg 2.6' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1231,7 +1231,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures recoverjpeg 2.3 to adapt to many kinds of systems. +\`configure' configures recoverjpeg 2.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1297,7 +1297,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of recoverjpeg 2.3:";; + short | recursive ) echo "Configuration of recoverjpeg 2.6:";; esac cat <<\_ACEOF @@ -1389,7 +1389,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -recoverjpeg configure 2.3 +recoverjpeg configure 2.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1482,7 +1482,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by recoverjpeg $as_me 2.3, which was +It was created by recoverjpeg $as_me 2.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1831,7 +1831,7 @@ -am__api_version='1.14' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2032,8 +2032,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2052,7 +2052,7 @@ $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2346,7 +2346,7 @@ # Define the identity of the package. PACKAGE='recoverjpeg' - VERSION='2.3' + VERSION='2.6' cat >>confdefs.h <<_ACEOF @@ -2380,8 +2380,8 @@ # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -2438,6 +2438,7 @@ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi + ac_config_headers="$ac_config_headers config.h" ac_ext=c @@ -4400,7 +4401,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by recoverjpeg $as_me 2.3, which was +This file was extended by recoverjpeg $as_me 2.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4466,7 +4467,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -recoverjpeg config.status 2.3 +recoverjpeg config.status 2.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru recoverjpeg-2.3/configure.ac recoverjpeg-2.6/configure.ac --- recoverjpeg-2.3/configure.ac 2014-03-05 13:37:24.000000000 +0000 +++ recoverjpeg-2.6/configure.ac 2015-10-11 17:03:50.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([recoverjpeg], [2.3]) +AC_INIT([recoverjpeg], [2.6]) AC_CONFIG_SRCDIR([recoverjpeg.c]) AM_INIT_AUTOMAKE AC_CONFIG_HEADER([config.h]) diff -Nru recoverjpeg-2.3/debian/changelog recoverjpeg-2.6/debian/changelog --- recoverjpeg-2.3/debian/changelog 2015-06-16 15:35:39.000000000 +0000 +++ recoverjpeg-2.6/debian/changelog 2015-10-12 01:17:30.000000000 +0000 @@ -1,3 +1,18 @@ +recoverjpeg (2.6-1) unstable; urgency=medium + + * New upstream release. + * debian/patches/: removed all patches. The upstream fixed the source code. + Thanks. + + -- Joao Eriberto Mota Filho Sun, 11 Oct 2015 22:11:21 -0300 + +recoverjpeg (2.4-1) unstable; urgency=medium + + * New upstream release. + * debian/copyright: updated the upstream copyright years. + + -- Joao Eriberto Mota Filho Sun, 11 Oct 2015 10:23:32 -0300 + recoverjpeg (2.3-3) unstable; urgency=medium * debian/control: using imagemagick as alternative to diff -Nru recoverjpeg-2.3/debian/copyright recoverjpeg-2.6/debian/copyright --- recoverjpeg-2.3/debian/copyright 2015-05-20 00:59:24.000000000 +0000 +++ recoverjpeg-2.6/debian/copyright 2015-10-11 13:42:08.000000000 +0000 @@ -4,7 +4,7 @@ https://github.com/samueltardieu/recoverjpeg Files: * -Copyright: 2004-2014 Samuel Tardieu +Copyright: 2004-2015 Samuel Tardieu 2010-2013 Jan Funke License: GPL-2 diff -Nru recoverjpeg-2.3/debian/patches/fix-makefile recoverjpeg-2.6/debian/patches/fix-makefile --- recoverjpeg-2.3/debian/patches/fix-makefile 2015-05-20 00:54:14.000000000 +0000 +++ recoverjpeg-2.6/debian/patches/fix-makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Description: fix Makefile to avoid remove an essential manpage. -Author: Joao Eriberto Mota Filho -Last-Update: 2015-05-17 -Index: recoverjpeg-2.3/Makefile.am -=================================================================== ---- recoverjpeg-2.3.orig/Makefile.am -+++ recoverjpeg-2.3/Makefile.am -@@ -18,4 +18,4 @@ recovermov_SOURCES = recovermov.cpp util - .md.1: - pandoc -s -w man $< -o $@ - --CLEANFILES = recoverjpeg.1 -+#CLEANFILES = recoverjpeg.1 diff -Nru recoverjpeg-2.3/debian/patches/fix-sort-pictures-command recoverjpeg-2.6/debian/patches/fix-sort-pictures-command --- recoverjpeg-2.3/debian/patches/fix-sort-pictures-command 2015-05-17 19:51:39.000000000 +0000 +++ recoverjpeg-2.6/debian/patches/fix-sort-pictures-command 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Description: fix the sort-picture command. -Bug: #766496 -Author: Joao Eriberto Mota Filho -Last-Update: 2015-05-17 -Index: recoverjpeg-2.3/sort-pictures -=================================================================== ---- recoverjpeg-2.3.orig/sort-pictures -+++ recoverjpeg-2.3/sort-pictures -@@ -32,7 +32,7 @@ dependencies () { - exit 1 - } - --identify > /dev/null 2>&1 || dependencies -+[ -f /usr/bin/identify ] || dependencies - exif --version > /dev/null 2>&1 || dependencies - - for i in image?????*.jpg; do diff -Nru recoverjpeg-2.3/debian/patches/series recoverjpeg-2.6/debian/patches/series --- recoverjpeg-2.3/debian/patches/series 2015-05-17 19:48:20.000000000 +0000 +++ recoverjpeg-2.6/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -fix-sort-pictures-command -fix-makefile diff -Nru recoverjpeg-2.3/depcomp recoverjpeg-2.6/depcomp --- recoverjpeg-2.3/depcomp 2014-03-05 13:09:46.000000000 +0000 +++ recoverjpeg-2.6/depcomp 2015-09-21 22:22:34.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru recoverjpeg-2.3/install-sh recoverjpeg-2.6/install-sh --- recoverjpeg-2.3/install-sh 2014-03-05 13:09:46.000000000 +0000 +++ recoverjpeg-2.6/install-sh 2015-09-21 22:22:34.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,74 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +370,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +449,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +467,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -Nru recoverjpeg-2.3/Makefile.am recoverjpeg-2.6/Makefile.am --- recoverjpeg-2.3/Makefile.am 2014-03-05 13:37:08.000000000 +0000 +++ recoverjpeg-2.6/Makefile.am 2015-10-11 17:00:54.000000000 +0000 @@ -17,5 +17,3 @@ .md.1: pandoc -s -w man $< -o $@ - -CLEANFILES = recoverjpeg.1 diff -Nru recoverjpeg-2.3/Makefile.in recoverjpeg-2.6/Makefile.in --- recoverjpeg-2.3/Makefile.in 2014-03-05 13:38:15.000000000 +0000 +++ recoverjpeg-2.6/Makefile.in 2015-10-11 17:04:08.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,14 +89,12 @@ POST_UNINSTALL = : bin_PROGRAMS = recoverjpeg$(EXEEXT) recovermov$(EXEEXT) subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(dist_bin_SCRIPTS) depcomp \ - $(dist_man_MANS) COPYING ChangeLog compile install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_bin_SCRIPTS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -203,6 +211,9 @@ CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in COPYING ChangeLog compile depcomp \ + install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -314,7 +325,6 @@ extra_DIST = ChangeLog recoverjpeg_SOURCES = recoverjpeg.c utils.c utils.h recovermov_SOURCES = recovermov.cpp utils.c utils.h -CLEANFILES = recoverjpeg.1 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -335,7 +345,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -651,15 +660,15 @@ $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -695,17 +704,17 @@ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -787,7 +796,6 @@ mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -892,6 +900,8 @@ uninstall-binPROGRAMS uninstall-dist_binSCRIPTS uninstall-man \ uninstall-man1 +.PRECIOUS: Makefile + always:: diff -Nru recoverjpeg-2.3/missing recoverjpeg-2.6/missing --- recoverjpeg-2.3/missing 2014-03-05 13:09:46.000000000 +0000 +++ recoverjpeg-2.6/missing 2015-09-21 22:22:34.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru recoverjpeg-2.3/recoverjpeg.1 recoverjpeg-2.6/recoverjpeg.1 --- recoverjpeg-2.3/recoverjpeg.1 2014-03-05 13:38:17.000000000 +0000 +++ recoverjpeg-2.6/recoverjpeg.1 2015-10-11 17:02:21.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "RECOVERJPEG" "1" "April 25, 2013" "Recoverjpeg User Manuals" "" +.TH "RECOVERJPEG" "1" "September 22, 2015" "Recoverjpeg User Manuals" "" .SH NAME .PP recoverjpeg \- recover jpeg pictures from a filesystem image @@ -19,6 +19,13 @@ 100,000 first ones will use a five figures number. Options \f[I]\-f\f[] and \f[I]\-i\f[] can override this behaviour. .PP +\f[C]recoverjpeg\f[] stores the recovered pictures into the current +directory. +If you want it to store them elsewhere, just go to the directory you +want \f[C]recoverjpeg\f[] to save the images into (using the \f[C]cd\f[] +command at the shell prompt) and start \f[C]recoverjpeg\f[] from there, +or use the \f[I]\-o\f[] option. +.PP Note that \f[I]device\f[] is not necessarily a physical device. It may also be a file containing a copy of the faulty device in order to reduce the actual processing time and the stress imposed to an already @@ -26,60 +33,102 @@ \f[C]dd\f[](1) or \f[C]ddrescue\f[](1) may be used to create such a working copy. .SH OPTIONS -.PP -\-h : Display an help message. -.PP -\-b \f[I]blocksize\f[] : Set the size of blocks in bytes. +.TP +.B \-h +Display an help message. +.RS +.RE +.TP +.B \-b \f[I]blocksize\f[] +Set the size of blocks in bytes. On most file systems, setting it to 512 (the default) will work fine as any large file will be stored on 512 bytes boundaries. Setting it to 1 maximize the chances of finding very small files if the filesystems aggregates them (UFS for example) at the expense of a much longer running time. -.PP -\-d \f[I]formatstring\f[] : Set the directory format string -(printf\-style, default: use the current directory). +.RS +.RE +.TP +.B \-d \f[I]formatstring\f[] +Set the directory format string (printf\-style, default: use the current +directory). When used, 0 will be used for the 100 first images, 1 for the 100 next images, and so on. The goal of this option is to circumvent the directory size limit imposed by some file systems. -.PP -\-f \f[I]formatstring\f[] : Set the file name format string -(printf\-style, default: "image%05d.jpg"). +.RS +.RE +.TP +.B \-f \f[I]formatstring\f[] +Set the file name format string (printf\-style, default: +"image%05d.jpg"). It is used with the image index as an integer argument. -.PP -\-i \f[I]integerindex\f[] : Set the initial index value for image -numbering (default: 0). -.PP -\-m \f[I]maxsize\f[] : Maximum size of extract jpeg files. +.RS +.RE +.TP +.B \-i \f[I]integerindex\f[] +Set the initial index value for image numbering (default: 0). +.RS +.RE +.TP +.B \-m \f[I]maxsize\f[] +Maximum size of extract jpeg files. If a file would be larger than that, it is discarded. The default is 6 MiB. -.PP -\-q : Be quiet and do not display anything. -.PP -\-r \f[I]readsize\f[] : Set the readsize in bytes. +.RS +.RE +.TP +.B \-o \f[I]directory\f[] +Change the working directory before restoring files. +Use this option to restore files into a directory with enough space +instead of the current directory. +.RS +.RE +.TP +.B \-q +Be quiet and do not display anything. +.RS +.RE +.TP +.B \-r \f[I]readsize\f[] +Set the readsize in bytes. By default, this is 128 MiB. Using a large readsize reduces the number of system calls but consumes more memory. The readsize will automatically be adjusted to be a multiple of the system page size. It \f[B]must\f[] be greater than the \f[I]maxsize\f[] parameter. -.PP -\-s \f[I]cutoffsize\f[] : Set the cutoff size in bytes. +.RS +.RE +.TP +.B \-s \f[I]cutoffsize\f[] +Set the cutoff size in bytes. Files smaller than that will be ignored. -.PP -\-S \f[I]skipsize\f[] : Set the number of bytes to skip at the beginning -of the filesystem image. +.RS +.RE +.TP +.B \-S \f[I]skipsize\f[] +Set the number of bytes to skip at the beginning of the filesystem +image. This can be used to resume an interrupted session, in conjunction with \f[I]\-i\f[]. The number of bytes may be rounded down to be a multiple of a memory page size in order to improve performances. -.PP -\-v : Be verbose and describes the process of jpeg identification. +.RS +.RE +.TP +.B \-v +Be verbose and describes the process of jpeg identification. By default, if this flag is not used, recoverjpeg will print a progress bar showing how much it has analyzed already and how many jpeg pictures have been recovered. -.PP -\-V : Display program version and exit. +.RS +.RE +.TP +.B \-V +Display program version and exit. +.RS +.RE .PP All the sizes may be suffixed by a \f[I]k\f[], \f[I]m\f[], \f[I]g\f[], or \f[I]t\f[] letter to indicate KiB, MiB, GiB, or TiB. diff -Nru recoverjpeg-2.3/recoverjpeg.c recoverjpeg-2.6/recoverjpeg.c --- recoverjpeg-2.3/recoverjpeg.c 2014-03-05 13:37:08.000000000 +0000 +++ recoverjpeg-2.6/recoverjpeg.c 2015-09-21 22:16:01.000000000 +0000 @@ -43,6 +43,7 @@ fprintf(stderr, " -i index Initial picture index\n"); fprintf(stderr, " -m maxsize Max jpeg file size in bytes " "(default: 6m)\n"); + fprintf(stderr, " -o directory Restore jpeg files into this directory\n"); fprintf(stderr, " -q Be quiet\n"); fprintf(stderr, " -r readsize Size of disk reads in bytes " "(default: 128m)\n"); @@ -65,7 +66,7 @@ off_t to_display; static unsigned int old_n = -1; static int gib_mode = 0; - static off_t old_to_display = 0.0; + static off_t old_to_display = 0; if (offset < 1024 * 1024 * 1024) { to_display = offset / 1024 * 10 / 1024; @@ -220,7 +221,7 @@ file_format = "image%05d.jpg"; dir_format = NULL; - while ((c = getopt(argc, (char * const *) argv, "b:d:f:hi:m:qr:s:S:vV")) != -1) { + while ((c = getopt(argc, (char * const *) argv, "b:d:f:hi:m:o:qr:s:S:vV")) != -1) { switch (c) { case 'b': block_size = atol_suffix(optarg); @@ -237,6 +238,9 @@ case 'm': max_size = atol_suffix(optarg); break; + case 'o': + move_to(optarg); + break; case 'q': quiet = 1; break; diff -Nru recoverjpeg-2.3/recovermov.1 recoverjpeg-2.6/recovermov.1 --- recoverjpeg-2.3/recovermov.1 2014-03-05 13:38:17.000000000 +0000 +++ recoverjpeg-2.6/recovermov.1 2015-09-21 22:24:04.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "RECOVERMOV" "1" "April 25, 2013" "Recovermov User Manuals" "" +.TH "RECOVERMOV" "1" "September 22, 2015" "Recovermov User Manuals" "" .SH NAME .PP recovermov \- recover movies from a filesystem image @@ -11,6 +11,13 @@ To achieve this goal, it scans the filesystem image and looks for a mov structure at blocks starting at 512 bytes boundaries. .PP +\f[C]recovermov\f[] stores the recovered movies into the current +directory. +If you want it to store them elsewhere, just go to the directory you +want \f[C]recovermov\f[] to save the movies into (using the \f[C]cd\f[] +command at the shell prompt) and start \f[C]recovermov\f[] from there, +or use the \f[I]\-o\f[] option. +.PP Note that \f[I]device\f[] is not necessarily a physical device. It may also be a file containing a copy of the faulty device in order to reduce the actual processing time and the stress imposed to an already @@ -18,23 +25,44 @@ \f[C]dd\f[](1) or \f[C]ddrescue\f[](1) may be used to create such a working copy. .SH OPTIONS -.PP -\-h : Display an help message. -.PP -\-b \f[I]blocksize\f[] : Set the size of blocks in bytes. +.TP +.B \-h +Display an help message. +.RS +.RE +.TP +.B \-b \f[I]blocksize\f[] +Set the size of blocks in bytes. On most file systems, setting it to 512 (the default) will work fine as any large file will be stored on 512 bytes boundaries. Setting it to 1 maximize the chances of finding very small files if the filesystems aggregates them (UFS for example) at the expense of a much longer running time. -.PP -\-i \f[I]integerindex\f[] : Set the initial index value for image -numbering (default: 0). -.PP -\-n \f[I]basename\f[] : Basename to use to create the salvaged files. +.RS +.RE +.TP +.B \-i \f[I]integerindex\f[] +Set the initial index value for image numbering (default: 0). +.RS +.RE +.TP +.B \-n \f[I]basename\f[] +Basename to use to create the salvaged files. Default is \f[C]video_\f[]. -.PP -\-V : Display program version and exit. +.RS +.RE +.TP +.B \-o \f[I]directory\f[] +Change the working directory before restoring files. +Use this option to restore files into a directory with enough space +instead of the current directory. +.RS +.RE +.TP +.B \-V +Display program version and exit. +.RS +.RE .PP All the sizes may be suffixed by a \f[I]k\f[], \f[I]m\f[], \f[I]g\f[], or \f[I]t\f[] letter to indicate KiB, MiB, GiB, or TiB. diff -Nru recoverjpeg-2.3/recovermov.cpp recoverjpeg-2.6/recovermov.cpp --- recoverjpeg-2.3/recovermov.cpp 2012-07-10 14:22:52.000000000 +0000 +++ recoverjpeg-2.6/recovermov.cpp 2015-09-21 22:15:28.000000000 +0000 @@ -86,6 +86,7 @@ std::cerr << " (default: \"video_\")\n"; std::cerr << " -h This help message\n"; std::cerr << " -i index Initial movie index\n"; + std::cerr << " -o directory Restore mov files into this directory\n"; std::cerr << " -V Display version and exit\n"; exit (exitcode); } @@ -97,7 +98,7 @@ std::string outfilebase = "video_"; int c; - while ((c = getopt (argc, argv, "b:f:hi:m:qr:vV")) != -1) { + while ((c = getopt (argc, argv, "b:f:hi:m:o:qr:vV")) != -1) { switch (c) { case 'b': blocksize = atol_suffix(optarg); @@ -108,6 +109,9 @@ case 'i': mov_index = atoi(optarg); break; + case 'o': + move_to(optarg); + break; case 'V': display_version_and_exit("recovermov"); default: diff -Nru recoverjpeg-2.3/remove-duplicates.1 recoverjpeg-2.6/remove-duplicates.1 --- recoverjpeg-2.3/remove-duplicates.1 2014-03-05 13:09:51.000000000 +0000 +++ recoverjpeg-2.6/remove-duplicates.1 2015-09-21 22:24:04.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "REMOVE\-DUPLICATES" "1" "April 25, 2013" "User Manuals" "" +.TH "REMOVE\-DUPLICATES" "1" "September 22, 2015" "User Manuals" "" .SH NAME .PP remove\-duplicates \- remove duplicates of the same file in the current diff -Nru recoverjpeg-2.3/sort-pictures recoverjpeg-2.6/sort-pictures --- recoverjpeg-2.3/sort-pictures 2012-07-10 14:22:52.000000000 +0000 +++ recoverjpeg-2.6/sort-pictures 2015-10-11 16:50:25.000000000 +0000 @@ -32,8 +32,8 @@ exit 1 } -identify > /dev/null 2>&1 || dependencies -exif --version > /dev/null 2>&1 || dependencies +type identify > /dev/null 2>&1 || dependencies +type exif > /dev/null 2>&1 || dependencies for i in image?????*.jpg; do d=`destdir $i` diff -Nru recoverjpeg-2.3/sort-pictures.1 recoverjpeg-2.6/sort-pictures.1 --- recoverjpeg-2.3/sort-pictures.1 2014-03-05 13:09:51.000000000 +0000 +++ recoverjpeg-2.6/sort-pictures.1 2015-09-21 22:24:04.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "SORT\-PICTURES" "1" "April 25, 2013" "User Manuals" "" +.TH "SORT\-PICTURES" "1" "September 22, 2015" "User Manuals" "" .SH NAME .PP sort\-pictures \- sort pictures according to exif date diff -Nru recoverjpeg-2.3/utils.c recoverjpeg-2.6/utils.c --- recoverjpeg-2.3/utils.c 2014-03-05 13:37:08.000000000 +0000 +++ recoverjpeg-2.6/utils.c 2015-09-21 22:15:54.000000000 +0000 @@ -13,6 +13,7 @@ #include #include #include +#include #include "utils.h" size_t @@ -51,3 +52,14 @@ printf("%s %s (from the `%s' package)\n", program_name, VERSION, PACKAGE); exit(0); } + +void +move_to(const char *directory) +{ + if (chdir(directory) != 0) { + char buffer[128]; + snprintf(buffer, sizeof buffer, "cannot change directory to `%s'", directory); + perror(buffer); + exit(1); + } +} diff -Nru recoverjpeg-2.3/utils.h recoverjpeg-2.6/utils.h --- recoverjpeg-2.3/utils.h 2012-07-10 14:22:52.000000000 +0000 +++ recoverjpeg-2.6/utils.h 2015-09-21 22:15:44.000000000 +0000 @@ -24,6 +24,8 @@ void display_version_and_exit(const char *program_name) __attribute__ ((noreturn)); + void move_to(const char *directory); + #ifdef __cplusplus } #endif // __cplusplus