diff --git a/Makefile.am b/Makefile.am
index 1433b9132..d971d339d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,11 +20,11 @@ CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/version.h
.PHONY: update-version
update-version:
- @if test -x $(top_srcdir)/maint/version.sh; then \
- $(top_srcdir)/maint/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
+ @if test -x $(top_srcdir)/maint/utils/version.sh; then \
+ $(top_srcdir)/maint/utils/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
else \
if test ! -e $(top_srcdir)/version.h; then \
- echo "File not found: $(top_srcdir)/maint/version.sh"; \
+ echo "File not found: $(top_srcdir)/maint/utils/version.sh"; \
exit 1; \
fi; \
fi
diff --git a/autogen.sh b/autogen.sh
index 7c3ed501b..071533ce6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,7 +23,7 @@ set -e
$AUTOPOINT --version >/dev/null 2>&1
if test $? -ne 0; then
- AUTOPOINT=maint/autopoint
+ AUTOPOINT=maint/utils/autopoint
fi
cd "$srcdir"
@@ -84,7 +84,7 @@ test -f configure || \
{ echo "autoconf failed to generate src/vfs/smbfs/helpers/configure" >&2; exit 1; }
) || exit 1
-$srcdir/maint/version.sh "$srcdir"
+$srcdir/maint/utils/version.sh "$srcdir"
if test -x $srcdir/configure.mc; then
$srcdir/configure.mc "$@"
diff --git a/m4.include/mc-version.m4 b/m4.include/mc-version.m4
index b687c06fa..a01ed297c 100644
--- a/m4.include/mc-version.m4
+++ b/m4.include/mc-version.m4
@@ -9,7 +9,7 @@ dnl @copyright Free Software Foundation, Inc.
AC_DEFUN([MC_VERSION],[
if test ! -f ${srcdir}/version.h; then
- ${srcdir}/maint/version.sh ${srcdir}
+ ${srcdir}/maint/utils/version.sh ${srcdir}
fi
if test -f ${srcdir}/version.h; then
VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/version.h | sed 's/.*"\(.*\)"$/\1/')
diff --git a/maint/README b/maint/docs/README
similarity index 100%
rename from maint/README
rename to maint/docs/README
diff --git a/maint/RELEASE_PROCEDURE b/maint/docs/RELEASE_PROCEDURE
similarity index 100%
rename from maint/RELEASE_PROCEDURE
rename to maint/docs/RELEASE_PROCEDURE
diff --git a/maint/systems.txt b/maint/docs/systems.txt
similarity index 100%
rename from maint/systems.txt
rename to maint/docs/systems.txt
diff --git a/maint/autopoint b/maint/utils/autopoint
similarity index 100%
rename from maint/autopoint
rename to maint/utils/autopoint
diff --git a/maint/doctest b/maint/utils/doctest
similarity index 97%
rename from maint/doctest
rename to maint/utils/doctest
index cb8384774..5ed5311e0 100755
--- a/maint/doctest
+++ b/maint/utils/doctest
@@ -27,7 +27,7 @@
#set -e
-MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(pwd))}
+MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
#*** include section (source functions, for example) *******************
diff --git a/maint/find-dup-includes/find-in-one-file.pl b/maint/utils/find-dup-includes/find-in-one-file.pl
similarity index 100%
rename from maint/find-dup-includes/find-in-one-file.pl
rename to maint/utils/find-dup-includes/find-in-one-file.pl
diff --git a/maint/find-dup-includes/runme.sh b/maint/utils/find-dup-includes/runme.sh
similarity index 86%
rename from maint/find-dup-includes/runme.sh
rename to maint/utils/find-dup-includes/runme.sh
index cd7206d65..9e7c5802d 100755
--- a/maint/find-dup-includes/runme.sh
+++ b/maint/utils/find-dup-includes/runme.sh
@@ -27,7 +27,7 @@ set -e
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
+MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(pwd))))}
#*** include section (source functions, for example) *******************
@@ -38,8 +38,8 @@ findIncludeDupsInDir() {
for i in $(find "${dir_name}" -name '*.[ch]'); do
file_name=$(echo $i | sed 's@'"${MC_SOURCE_ROOT_DIR}/"'@@g')
- [ $(grep "^\s*${file_name}$" -c "${MC_SOURCE_ROOT_DIR}/maint/find-dup-includes/exclude-list.cfg") -ne 0 ] && continue
- "${MC_SOURCE_ROOT_DIR}/maint/find-dup-includes/find-in-one-file.pl" "${i}"
+ [ $(grep "^\s*${file_name}$" -c "${MC_SOURCE_ROOT_DIR}/maint/utils/find-dup-includes/exclude-list.cfg") -ne 0 ] && continue
+ "${MC_SOURCE_ROOT_DIR}/maint/utils/find-dup-includes/find-in-one-file.pl" "${i}"
done
}
diff --git a/maint/sync-transifex/.gitignore b/maint/utils/sync-transifex/.gitignore
similarity index 100%
rename from maint/sync-transifex/.gitignore
rename to maint/utils/sync-transifex/.gitignore
diff --git a/maint/sync-transifex/README.txt b/maint/utils/sync-transifex/README.txt
similarity index 100%
rename from maint/sync-transifex/README.txt
rename to maint/utils/sync-transifex/README.txt
diff --git a/maint/sync-transifex/config.d/mc.hint/po4a.cfg b/maint/utils/sync-transifex/config.d/mc.hint/po4a.cfg
similarity index 100%
rename from maint/sync-transifex/config.d/mc.hint/po4a.cfg
rename to maint/utils/sync-transifex/config.d/mc.hint/po4a.cfg
diff --git a/maint/sync-transifex/config.d/mc.hint/tx.config b/maint/utils/sync-transifex/config.d/mc.hint/tx.config
similarity index 100%
rename from maint/sync-transifex/config.d/mc.hint/tx.config
rename to maint/utils/sync-transifex/config.d/mc.hint/tx.config
diff --git a/maint/sync-transifex/config.d/po/po-ignore.list b/maint/utils/sync-transifex/config.d/po/po-ignore.list
similarity index 100%
rename from maint/sync-transifex/config.d/po/po-ignore.list
rename to maint/utils/sync-transifex/config.d/po/po-ignore.list
diff --git a/maint/sync-transifex/config.d/po/tx.config b/maint/utils/sync-transifex/config.d/po/tx.config
similarity index 100%
rename from maint/sync-transifex/config.d/po/tx.config
rename to maint/utils/sync-transifex/config.d/po/tx.config
diff --git a/maint/sync-transifex/functions b/maint/utils/sync-transifex/functions
similarity index 97%
rename from maint/sync-transifex/functions
rename to maint/utils/sync-transifex/functions
index 7cdf5a09b..e6e63cb28 100644
--- a/maint/sync-transifex/functions
+++ b/maint/utils/sync-transifex/functions
@@ -50,7 +50,7 @@ getConfigFile() {
sync_file_name=$1; shift
config_file_name=$1; shift
- echo "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/config.d/${sync_file_name}/${config_file_name}"
+ echo "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/config.d/${sync_file_name}/${config_file_name}"
}
# ----------------------------------------------------------------------
diff --git a/maint/sync-transifex/mc.hint-fromTransifex.sh b/maint/utils/sync-transifex/mc.hint-fromTransifex.sh
similarity index 89%
rename from maint/sync-transifex/mc.hint-fromTransifex.sh
rename to maint/utils/sync-transifex/mc.hint-fromTransifex.sh
index 17946f4e0..c7a9d1ee8 100755
--- a/maint/sync-transifex/mc.hint-fromTransifex.sh
+++ b/maint/utils/sync-transifex/mc.hint-fromTransifex.sh
@@ -25,11 +25,11 @@
set -e
-MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
+MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(dirname $(pwd))))}
#*** include section (source functions, for example) *******************
-source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
+source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
#*** file scope functions **********************************************
diff --git a/maint/sync-transifex/mc.hint-toTransifex.sh b/maint/utils/sync-transifex/mc.hint-toTransifex.sh
similarity index 89%
rename from maint/sync-transifex/mc.hint-toTransifex.sh
rename to maint/utils/sync-transifex/mc.hint-toTransifex.sh
index 25e0b8190..2fa9c0c30 100755
--- a/maint/sync-transifex/mc.hint-toTransifex.sh
+++ b/maint/utils/sync-transifex/mc.hint-toTransifex.sh
@@ -25,11 +25,11 @@
set -e
-MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
+MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(dirname $(pwd))))}
#*** include section (source functions, for example) *******************
-source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
+source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
#*** file scope functions **********************************************
diff --git a/maint/sync-transifex/po-fromTransifex.sh b/maint/utils/sync-transifex/po-fromTransifex.sh
similarity index 92%
rename from maint/sync-transifex/po-fromTransifex.sh
rename to maint/utils/sync-transifex/po-fromTransifex.sh
index b55a95118..230e7e3e8 100755
--- a/maint/sync-transifex/po-fromTransifex.sh
+++ b/maint/utils/sync-transifex/po-fromTransifex.sh
@@ -25,11 +25,11 @@
set -e
-MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
+MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(dirname $(pwd))))}
#*** include section (source functions, for example) *******************
-source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
+source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
#*** file scope functions **********************************************
diff --git a/maint/sync-transifex/po-toTransifex.sh b/maint/utils/sync-transifex/po-toTransifex.sh
similarity index 90%
rename from maint/sync-transifex/po-toTransifex.sh
rename to maint/utils/sync-transifex/po-toTransifex.sh
index 5ca1eb7d1..82f030032 100755
--- a/maint/sync-transifex/po-toTransifex.sh
+++ b/maint/utils/sync-transifex/po-toTransifex.sh
@@ -25,11 +25,11 @@
set -e
-MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
+MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(pwd))))}
#*** include section (source functions, for example) *******************
-source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
+source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
#*** file scope functions **********************************************
diff --git a/maint/unrefglobals.pl b/maint/utils/unrefglobals.pl
similarity index 100%
rename from maint/unrefglobals.pl
rename to maint/utils/unrefglobals.pl
diff --git a/maint/utils/version.sh b/maint/utils/version.sh
new file mode 100755
index 000000000..e807eb124
--- /dev/null
+++ b/maint/utils/version.sh
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Midnight Commander - calculate current version
+#
+# Copyright (C) 2009, 2010, 2013
+# The Free Software Foundation, Inc.
+#
+# Written by:
+# Slava Zanko , 2009, 2010, 2013
+# Stan. S. Krupoderov , 2009
+# Sergei Trofimovich , 2009
+# Oswald Buddenhagen , 2009
+#
+# This file is part of the Midnight Commander.
+#
+# The Midnight Commander is free software: you can redistribute it
+# and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the License,
+# or (at your option) any later version.
+#
+# The Midnight Commander is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+#*** include section (source functions, for example) *******************
+
+#*** file scope functions **********************************************
+
+mc_print_version(){
+
+ if [ ! -f "${VERSION_FILE}" \
+ -o "${PREV_MC_VERSION}" != "${CURR_MC_VERSION}" ]
+ then
+ cat >"${VERSION_FILE}" <"
+ exit 1
+fi
+
+src_top_dir="$1"
+
+VERSION_FILE="${src_top_dir}/version.h"
+PREV_MC_VERSION="unknown"
+CURR_MC_VERSION="${PREV_MC_VERSION}"
+
+if [ -r "${VERSION_FILE}" ]
+ then
+ PREV_MC_VERSION=`sed -n 's/^#define MC_CURRENT_VERSION "\(.*\)"$/\1/p' "${VERSION_FILE}"`
+ CURR_MC_VERSION="${PREV_MC_VERSION}"
+fi
+
+git_head=`git --git-dir "${src_top_dir}/.git" rev-parse --verify HEAD 2>/dev/null`
+[ -z "${git_head}" ] && mc_print_version
+
+# try to store sha1
+CURR_MC_VERSION="${git_head}"
+
+new_version=`git --git-dir "${src_top_dir}/.git" describe 2>/dev/null`
+[ -z "${new_version}" ] && mc_print_version
+
+# store pretty tagged version
+CURR_MC_VERSION="${new_version}"
+mc_print_version
diff --git a/maint/version.sh b/maint/version.sh
deleted file mode 100755
index 3b046dab7..000000000
--- a/maint/version.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-if [ -z "$1" ]
- then
- echo "usage: $0 "
- exit 1
-fi
-
-src_top_dir="$1"
-
-VERSION_FILE="${src_top_dir}/version.h"
-PREV_MC_VERSION="unknown"
-CURR_MC_VERSION="${PREV_MC_VERSION}"
-
-if [ -r "${VERSION_FILE}" ]
- then
- PREV_MC_VERSION=`sed -n 's/^#define MC_CURRENT_VERSION "\(.*\)"$/\1/p' "${VERSION_FILE}"`
- CURR_MC_VERSION="${PREV_MC_VERSION}"
-fi
-
-mc_print_version(){
-
- if [ ! -f "${VERSION_FILE}" \
- -o "${PREV_MC_VERSION}" != "${CURR_MC_VERSION}" ]
- then
- cat >"${VERSION_FILE}" </dev/null`
-[ -z "${git_head}" ] && mc_print_version
-
-# try to store sha1
-CURR_MC_VERSION="${git_head}"
-
-new_version=`git --git-dir "${src_top_dir}/.git" describe 2>/dev/null`
-[ -z "${new_version}" ] && mc_print_version
-
-# store pretty tagged version
-CURR_MC_VERSION="${new_version}"
-mc_print_version