Skip to content

Commit 1c6d859

Browse files
committed
Reorder files in maint/ subdirectory.
Signed-off-by: Slava Zanko <[email protected]>
1 parent 80c8d58 commit 1c6d859

24 files changed

+98
-66
lines changed

Makefile.am

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/version.h
2020
.PHONY: update-version
2121

2222
update-version:
23-
@if test -x $(top_srcdir)/maint/version.sh; then \
24-
$(top_srcdir)/maint/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
23+
@if test -x $(top_srcdir)/maint/utils/version.sh; then \
24+
$(top_srcdir)/maint/utils/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
2525
else \
2626
if test ! -e $(top_srcdir)/version.h; then \
27-
echo "File not found: $(top_srcdir)/maint/version.sh"; \
27+
echo "File not found: $(top_srcdir)/maint/utils/version.sh"; \
2828
exit 1; \
2929
fi; \
3030
fi

autogen.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set -e
2323

2424
$AUTOPOINT --version >/dev/null 2>&1
2525
if test $? -ne 0; then
26-
AUTOPOINT=maint/autopoint
26+
AUTOPOINT=maint/utils/autopoint
2727
fi
2828

2929
cd "$srcdir"
@@ -84,7 +84,7 @@ test -f configure || \
8484
{ echo "autoconf failed to generate src/vfs/smbfs/helpers/configure" >&2; exit 1; }
8585
) || exit 1
8686

87-
$srcdir/maint/version.sh "$srcdir"
87+
$srcdir/maint/utils/version.sh "$srcdir"
8888

8989
if test -x $srcdir/configure.mc; then
9090
$srcdir/configure.mc "$@"

m4.include/mc-version.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dnl @copyright Free Software Foundation, Inc.
99

1010
AC_DEFUN([MC_VERSION],[
1111
if test ! -f ${srcdir}/version.h; then
12-
${srcdir}/maint/version.sh ${srcdir}
12+
${srcdir}/maint/utils/version.sh ${srcdir}
1313
fi
1414
if test -f ${srcdir}/version.h; then
1515
VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/version.h | sed 's/.*"\(.*\)"$/\1/')

maint/README maint/docs/README

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

maint/doctest maint/utils/doctest

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#set -e
2929

30-
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(pwd))}
30+
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
3131

3232
#*** include section (source functions, for example) *******************
3333

maint/find-dup-includes/runme.sh maint/utils/find-dup-includes/runme.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ set -e
2727
# You should have received a copy of the GNU General Public License
2828
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2929

30-
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
30+
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(pwd))))}
3131

3232
#*** include section (source functions, for example) *******************
3333

@@ -38,8 +38,8 @@ findIncludeDupsInDir() {
3838

3939
for i in $(find "${dir_name}" -name '*.[ch]'); do
4040
file_name=$(echo $i | sed 's@'"${MC_SOURCE_ROOT_DIR}/"'@@g')
41-
[ $(grep "^\s*${file_name}$" -c "${MC_SOURCE_ROOT_DIR}/maint/find-dup-includes/exclude-list.cfg") -ne 0 ] && continue
42-
"${MC_SOURCE_ROOT_DIR}/maint/find-dup-includes/find-in-one-file.pl" "${i}"
41+
[ $(grep "^\s*${file_name}$" -c "${MC_SOURCE_ROOT_DIR}/maint/utils/find-dup-includes/exclude-list.cfg") -ne 0 ] && continue
42+
"${MC_SOURCE_ROOT_DIR}/maint/utils/find-dup-includes/find-in-one-file.pl" "${i}"
4343
done
4444
}
4545

File renamed without changes.
File renamed without changes.

maint/sync-transifex/functions maint/utils/sync-transifex/functions

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ getConfigFile() {
5050
sync_file_name=$1; shift
5151
config_file_name=$1; shift
5252

53-
echo "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/config.d/${sync_file_name}/${config_file_name}"
53+
echo "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/config.d/${sync_file_name}/${config_file_name}"
5454
}
5555

5656
# ----------------------------------------------------------------------

maint/sync-transifex/mc.hint-fromTransifex.sh maint/utils/sync-transifex/mc.hint-fromTransifex.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
set -e
2727

28-
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
28+
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(dirname $(pwd))))}
2929

3030
#*** include section (source functions, for example) *******************
3131

32-
source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
32+
source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
3333

3434
#*** file scope functions **********************************************
3535

maint/sync-transifex/mc.hint-toTransifex.sh maint/utils/sync-transifex/mc.hint-toTransifex.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
set -e
2727

28-
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
28+
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(dirname $(pwd))))}
2929

3030
#*** include section (source functions, for example) *******************
3131

32-
source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
32+
source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
3333

3434
#*** file scope functions **********************************************
3535

maint/sync-transifex/po-fromTransifex.sh maint/utils/sync-transifex/po-fromTransifex.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
set -e
2727

28-
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
28+
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(dirname $(pwd))))}
2929

3030
#*** include section (source functions, for example) *******************
3131

32-
source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
32+
source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
3333

3434
#*** file scope functions **********************************************
3535

maint/sync-transifex/po-toTransifex.sh maint/utils/sync-transifex/po-toTransifex.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
set -e
2727

28-
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
28+
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(pwd))))}
2929

3030
#*** include section (source functions, for example) *******************
3131

32-
source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
32+
source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
3333

3434
#*** file scope functions **********************************************
3535

File renamed without changes.

maint/utils/version.sh

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/bin/sh
2+
3+
# Midnight Commander - calculate current version
4+
#
5+
# Copyright (C) 2009, 2010, 2013
6+
# The Free Software Foundation, Inc.
7+
#
8+
# Written by:
9+
# Slava Zanko <[email protected]>, 2009, 2010, 2013
10+
# Stan. S. Krupoderov <[email protected]>, 2009
11+
# Sergei Trofimovich <[email protected]>, 2009
12+
# Oswald Buddenhagen <[email protected]>, 2009
13+
#
14+
# This file is part of the Midnight Commander.
15+
#
16+
# The Midnight Commander is free software: you can redistribute it
17+
# and/or modify it under the terms of the GNU General Public License as
18+
# published by the Free Software Foundation, either version 3 of the License,
19+
# or (at your option) any later version.
20+
#
21+
# The Midnight Commander is distributed in the hope that it will be useful,
22+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
23+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24+
# GNU General Public License for more details.
25+
#
26+
# You should have received a copy of the GNU General Public License
27+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
28+
29+
#*** include section (source functions, for example) *******************
30+
31+
#*** file scope functions **********************************************
32+
33+
mc_print_version(){
34+
35+
if [ ! -f "${VERSION_FILE}" \
36+
-o "${PREV_MC_VERSION}" != "${CURR_MC_VERSION}" ]
37+
then
38+
cat >"${VERSION_FILE}" <<EOF
39+
#ifndef MC_CURRENT_VERSION
40+
/* This is an autogenerated file. Don't edit! */
41+
#define MC_CURRENT_VERSION "${CURR_MC_VERSION}"
42+
#endif
43+
EOF
44+
fi
45+
exit
46+
}
47+
48+
#*** main code *********************************************************
49+
50+
if [ -z "$1" ]
51+
then
52+
echo "usage: $0 <toplevel-source-dir>"
53+
exit 1
54+
fi
55+
56+
src_top_dir="$1"
57+
58+
VERSION_FILE="${src_top_dir}/version.h"
59+
PREV_MC_VERSION="unknown"
60+
CURR_MC_VERSION="${PREV_MC_VERSION}"
61+
62+
if [ -r "${VERSION_FILE}" ]
63+
then
64+
PREV_MC_VERSION=`sed -n 's/^#define MC_CURRENT_VERSION "\(.*\)"$/\1/p' "${VERSION_FILE}"`
65+
CURR_MC_VERSION="${PREV_MC_VERSION}"
66+
fi
67+
68+
git_head=`git --git-dir "${src_top_dir}/.git" rev-parse --verify HEAD 2>/dev/null`
69+
[ -z "${git_head}" ] && mc_print_version
70+
71+
# try to store sha1
72+
CURR_MC_VERSION="${git_head}"
73+
74+
new_version=`git --git-dir "${src_top_dir}/.git" describe 2>/dev/null`
75+
[ -z "${new_version}" ] && mc_print_version
76+
77+
# store pretty tagged version
78+
CURR_MC_VERSION="${new_version}"
79+
mc_print_version

maint/version.sh

-47
This file was deleted.

0 commit comments

Comments
 (0)