[uctodata] 01/03: New upstream version 0.5
Maarten van Gompel
proycon-guest at moszumanska.debian.org
Tue Nov 7 11:29:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
proycon-guest pushed a commit to branch master
in repository uctodata.
commit 332b83e7dc058f1a2098f65cb68352d2abb99cdb
Author: proycon <proycon at anaproy.nl>
Date: Tue Nov 7 12:21:46 2017 +0100
New upstream version 0.5
---
ChangeLog | 53 ++++++++++++
Makefile.in | 9 +-
NEWS | 10 +++
config/Makefile.am | 2 +-
config/Makefile.in | 3 +-
config/tokconfig-nld-historical | 185 ++++++++++++++++++++++++++++++++++++++++
configure | 34 +++++---
configure.ac | 2 +-
install-sh | 23 +++--
9 files changed, 295 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7f474bc..e79a627 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2017-10-18 Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+ * NEWS: NEWS update
+
+2017-09-14 Maarten van Gompel <proycon at anaproy.nl>
+
+ * : commit 5ce2a4b59a71259a393914f2eb39cfabb28add2e Author: Maarten
+ van Gompel <proycon at anaproy.nl> Date: Thu Sep 14 16:00:41 2017
+ +0200
+
+2017-09-14 Maarten van Gompel <proycon at anaproy.nl>
+
+ * config/Makefile.am, config/tokconfig-nld-historical: adding
+ slightly adapted tokenizer configuration for historical dutch (a bit
+ more conservative on splitting).
+ INL/nederlab-linguistic-enrichment/#7
+
+2017-03-14 Maarten van Gompel <proycon at anaproy.nl>
+
+ * : commit 35be7ba6cb880cc7b8d017e34d1981580bac449a Author: Ko van
+ der Sloot <K.vanderSloot at let.ru.nl> Date: Mon Jan 23 14:30:14 2017
+ +0100
+
2017-01-23 Maarten van Gompel <proycon at anaproy.nl>
* README.md: README update
@@ -94,6 +117,36 @@
* NEWS: updated NEWS for upcoming release
+2016-11-15 Maarten van Gompel <proycon at anaproy.nl>
+
+ * generate-setdefinitions.py,
+ setdefinitions/tokconfig-nld.foliaset.ttl: Set definition generation
+ fix
+
+2016-11-15 Maarten van Gompel <proycon at anaproy.nl>
+
+ * setdefinitions/tokconfig-deu.foliaset.ttl,
+ setdefinitions/tokconfig-eng.foliaset.ttl,
+ setdefinitions/tokconfig-fra.foliaset.ttl,
+ setdefinitions/tokconfig-fry.foliaset.ttl,
+ setdefinitions/tokconfig-generic.foliaset.ttl,
+ setdefinitions/tokconfig-ita.foliaset.ttl,
+ setdefinitions/tokconfig-nld-sonarchat.foliaset.ttl,
+ setdefinitions/tokconfig-nld-twitter.foliaset.ttl,
+ setdefinitions/tokconfig-nld-withplaceholder.foliaset.ttl,
+ setdefinitions/tokconfig-nld.foliaset.ttl,
+ setdefinitions/tokconfig-por.foliaset.ttl,
+ setdefinitions/tokconfig-rus.foliaset.ttl,
+ setdefinitions/tokconfig-spa.foliaset.ttl,
+ setdefinitions/tokconfig-swe.foliaset.ttl,
+ setdefinitions/tokconfig-tur.foliaset.ttl: Added autogenerated set
+ definitions
+
+2016-11-15 Maarten van Gompel <proycon at anaproy.nl>
+
+ * generate-setdefinitions.py: Added script to generate FoLiA set
+ definitions (SKOS/RDF) from configuration files
+
2016-11-11 Ko van der Sloot <K.vanderSloot at let.ru.nl>
* config/tokconfig-deu, config/tokconfig-fry,
diff --git a/Makefile.in b/Makefile.in
index 87e3b46..f007a73 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,6 +294,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -537,7 +538,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@@ -563,7 +564,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -581,7 +582,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -591,7 +592,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
diff --git a/NEWS b/NEWS
index b90a70e..7438464 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+0.5 [Ko vd Sloot] 18-10-2017
+ * adding slightly adapted tokenizer configuration for historical dutch
+ (a bit more conservative on splitting).
+ INL/nederlab-linguistic-enrichment/#7
+
+0.4 [Maarten van Gompel] 23-01-2017
+ * Data files are moved to share/ instead of etc/
+ (incompatible with ucto < 0.9.6)
+ * DATE pattern expanded (LanguageMachines/ucto#16)
+
0.3.1 [Ko van der Sloot] 06-01-2017
Bug fix release:
* fixed install problem in debian packaging using DESTDIR
diff --git a/config/Makefile.am b/config/Makefile.am
index 62461af..6f2c3b0 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1,7 +1,7 @@
config_DATA = tokconfig-eng tokconfig-nld tokconfig-fra tokconfig-ita \
tokconfig-spa tokconfig-por tokconfig-deu tokconfig-swe \
tokconfig-nld-twitter tokconfig-nld-sonarchat tokconfig-tur \
- tokconfig-nld-withplaceholder tokconfig-fry tokconfig-rus \
+ tokconfig-nld-withplaceholder tokconfig-nld-historical tokconfig-fry tokconfig-rus \
ligatures.filter \
exotic-quotes.quote exotic-eos.eos \
nld_afk.abr spa.abr por.abr
diff --git a/config/Makefile.in b/config/Makefile.in
index 555df5a..779a2eb 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -212,6 +212,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -223,7 +224,7 @@ top_srcdir = @top_srcdir@
config_DATA = tokconfig-eng tokconfig-nld tokconfig-fra tokconfig-ita \
tokconfig-spa tokconfig-por tokconfig-deu tokconfig-swe \
tokconfig-nld-twitter tokconfig-nld-sonarchat tokconfig-tur \
- tokconfig-nld-withplaceholder tokconfig-fry tokconfig-rus \
+ tokconfig-nld-withplaceholder tokconfig-nld-historical tokconfig-fry tokconfig-rus \
ligatures.filter \
exotic-quotes.quote exotic-eos.eos \
nld_afk.abr spa.abr por.abr
diff --git a/config/tokconfig-nld-historical b/config/tokconfig-nld-historical
new file mode 100644
index 0000000..0e0dc89
--- /dev/null
+++ b/config/tokconfig-nld-historical
@@ -0,0 +1,185 @@
+version=0.2
+[RULE-ORDER]
+GENITIVEPLACENAME WORD-WITHSUFFIX WORD-INFIX-COMPOUND QUOTE-SUFFIX
+WORD-DIMIN WORD-TOKEN NUMBER-ORDINAL DATE-REVERSE DATE
+URL URL-WWW URL-DOMAIN E-MAIL
+ABBREVIATION-COMPOUND COMPOUND-ABBREVIATION
+QUOTE-COMPOUND WORD-COMPOUND WORD-ILLEGIBLE NUMBER-COMPOUND
+#UNIT-COMPOUND
+INITIAL
+ABBREVIATION
+ABBREVIATION-KNOWN
+CURRENCY
+NUMBER-STRING STRING-NUMBER
+WORD-PARPREFIX-PARSUFFIX WORD-PARPREFIX WORD-PARSUFFIX
+INITIALS
+#UNIT
+PUNCTUATION-MULTI-DOT
+PUNCTUATION-MULTI
+NUMBER-YEAR TIME FRACNUMBER NUMBER WORD PUNCTUATION UNKNOWN
+# to do PREFIXES, SUFFIXES (beide leeg nu)
+# UNITS (grotendeels uitgecommentarieerd in de c++ code)
+
+[META-RULES]
+SPLITTER=%
+NUMBER-ORDINAL = \p{N}+-?(?i)(?: %ORDINALS% )(?:\Z|\P{Lu}|\P{Ll})$
+
+# the ^\p{S} prevents splitting <tag> like strings
+ABBREVIATION-KNOWN = (?:\p{P}*)?(?:\A|[^\p{L}\p{S}\.])((?:%ABBREVIATIONS%)(?:\.{0,1}))(?:\Z|\P{L})
+WORD-TOKEN =(?i)(%TOKENS%)(?:\p{P}*)?$
+WORD-WITHSUFFIX = ((?:\p{L}|\p{N}|-)+(?i)(?: %ATTACHEDSUFFIXES% ))(?:\Z)
+WORD-INFIX-COMPOUND = ((?:\p{L}|\p{N}|-)+(?i)(?: %ATTACHEDSUFFIXES% )-(?:\p{L}+))$
+
+CURRENCY=^(\p{Sc}|%CURRENCY%)(?:\p{N}|\Z)
+
+#PREFIX = (?:\A|[^\p{Lu}\.]|[^\p{Ll}\.])(%PREFIXES% )(\p{L}+)
+#SUFFIX = ((?:\p{L})+)( %SUFFIXES% )(?:\Z|\P{L})
+
+#UNIT-COMPOUND = \p{N}+((?i: %UNITS% )(?:[./*=]{1})(?i: %UNITS% )(?:\p{P}{0,1}))$
+#UNIT = (?i)(?:\a|\P{L})( %UNITS% )(?:\z|\P{L})
+
+[RULES]
+%include url
+%include e-mail
+
+#Ex (oud)-studente(s)
+WORD-PARPREFIX-PARSUFFIX=(?:\p{Ps}\p{L}+[\p{Pc}\p{Pd}]?\p{Pe}[\p{Pc}\p{Pd}]?)\p{L}+(?:[\p{Pc}\p{Pd}]\p{L}+)*(?:[\p{Pc}\p{Pd}]?\p{Ps}[\p{Pc}\p{Pd}]?\p{L}+\p{Pe})
+
+#Ex: (oud)-studente, (on)zin,
+WORD-PARPREFIX=(?:\p{Ps}\p{L}+[\p{Pc}\p{Pd}]?\p{Pe}[\p{Pc}\p{Pd}]?)\p{L}+(?:[\p{Pc}\p{Pd}]\p{L}+)*
+
+#Ex: koning(in)
+WORD-PARSUFFIX=\p{L}+(?:[\p{Pc}\p{Pd}]\p{L}+)*(?:[\p{Pc}\p{Pd}]?\p{Ps}[\p{Pc}\p{Pd}]?\p{L}+\p{Pe})
+
+#Ex: baby'tje
+WORD-DIMIN=[\p{L}\p{N}]+['`’‘´]tjes{0,1}
+
+#Keep dash/underscore/quote connected parts (even if they are in parenthesis)
+WORD-COMPOUND=[\p{L}\p{N}]+(?:[\p{Pc}\p{Pd}'`’‘´][\p{L}\p{N}]+)+
+
+#Keep [...] constructions inside words, indicating illegibility of a part or the whole: rege[..]ng
+WORD-ILLEGIBLE=[\p{L}\p{N}]*(?:\[\.+\])[\p{L}\p{N}]*
+
+#Keep quote connected parts.
+QUOTE-COMPOUND=[\p{L}\p{N}-]+(?:['`’‘´]\p{L}{1})+(?:-[\p{L}\p{N}]+)+
+
+#Abbreviations with multiple periods: a.u.b
+ABBREVIATION=^(\p{L}{1,3}(?:\.\p{L}{1,3})+\.?)(?:\Z|[,:;])
+
+# a compound of a word and an abbreviation with multiple periods: bouw-c.a.o.
+COMPOUND-ABBREVIATION=^(?:\p{L}+-\p{L}{1,3}(?:\.\p{L}{1,3})+\.?)\Z
+
+# a compound of an abbreviation with multiple periods and a word: C.B.S.-data
+ABBREVIATION-COMPOUND=^(\p{L}{1,3}(?:\.\p{L}{1,3})+\.?-\p{L}+)
+
+#Initials glued to a longer word: A.F.Zetterij -> A.F. Zetterij
+INITIALS=(\p{L}(?:\.\p{L})+\.)\p{Lu}\p{L}{3,999}+
+
+#retain initials
+INITIAL=^(?:\p{Lt}|\p{Lu})\.$
+
+#Homogeneous punctuation (ellipsis etc)
+PUNCTUATION-MULTI-DOT=(?:\-|_|\*|=|!|<|>|\?){2,}(\.)
+PUNCTUATION-MULTI=(?:(?:\-|_|\*|=|!|<|>|\?){2,})|(?:\.){2,}
+
+#Date
+DATE=\p{N}{1,2}[-\.]\p{N}{1,2}[-\.]['’‘´\`]?\p{N}{2,4}
+DATE-REVERSE=\p{N}{4}[-\.]\p{N}{1,2}[-\.]\p{N}{1,2}
+
+FRACNUMBER=\p{N}+(?:/\p{N}+)+
+
+#tel numberstring (23)3748748 or (+31)9393902
+NUMBER-COMPOUND=\(\+{0,1}\p{N}{1,3}\)(?:\p{N}+)
+
+#numberstring like 20jarige
+NUMBER-STRING=^\p{N}+(?:\p{Pd}?)(?:\p{L}+)
+
+#combinations like A50, a1
+STRING-NUMBER=\p{L}+\p{Pd}?\p{N}+
+
+#abbreviated year: '40
+NUMBER-YEAR=(['`’‘´]\p{N}{2})(?:\P{N}|\z)
+
+#Times
+TIME=\p{N}{1,2}:\p{N}{1,2}(?::\p{N}{1,2})?(am|pm|AM|PM)?
+
+#retain digits, including those starting with initial period (.22), and negative numbers
+NUMBER=-?(?:[\.,]?\p{N}+)+
+
+#'s-Gravenhage, 's-Hertogenbosch
+GENITIVEPLACENAME=['`’‘´][sS]-\p{Lu}\p{L}+
+
+WORD=[\p{L}\p{Mn}\-]+
+
+PUNCTUATION=\p{P}
+
+UNKNOWN=.
+
+QUOTE-SUFFIX=(\p{Lu}(?:\p{L})+(?:s['`’‘´]|x['`’‘´]))
+
+[PREFIXES]
+
+[SUFFIXES]
+
+[ATTACHEDSUFFIXES]
+\['`’‘´][s]
+\['`’‘´][t]
+\['`’‘´][n]
+\['`’‘´][r]
+
+[ORDINALS]
+e
+de
+ste
+er
+
+
+[TOKENS]
+\['`’‘´][s]
+\['`’‘´][k]
+\['`’‘´][m]
+\['`’‘´][n]
+\['`’‘´][t]
+\['`’‘´](?:ie)
+
+[UNITS]
+km
+cm
+mmol
+mm
+mol
+m
+g
+kg
+C
+l
+s
+sec
+min
+gb
+mb
+kb
+
+
+[CURRENCY]
+eur|EUR
+hfl
+fl
+f
+
+
+[ABBREVIATIONS]
+%include nld_afk
+&c
+
+[FILTER]
+%include ligatures
+# also filter soft hyphen
+\u00AD
+
+[EOSMARKERS]
+%include standard-eos
+
+[QUOTES]
+%include standard-quotes
+%include exotic-quotes
diff --git a/configure b/configure
index a43c19e..34d9781 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for uctodata 0.4.
+# Generated by GNU Autoconf 2.69 for uctodata 0.5.
#
# Report bugs to <lamasoftware at science.ru.nl>.
#
@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='uctodata'
PACKAGE_TARNAME='uctodata'
-PACKAGE_VERSION='0.4'
-PACKAGE_STRING='uctodata 0.4'
+PACKAGE_VERSION='0.5'
+PACKAGE_STRING='uctodata 0.5'
PACKAGE_BUGREPORT='lamasoftware at science.ru.nl'
PACKAGE_URL=''
@@ -634,6 +634,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -699,6 +700,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -951,6 +953,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1088,7 +1099,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1201,7 +1212,7 @@ if test "$ac_init_help" = "long"; then
# 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 uctodata 0.4 to adapt to many kinds of systems.
+\`configure' configures uctodata 0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1241,6 +1252,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1267,7 +1279,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of uctodata 0.4:";;
+ short | recursive ) echo "Configuration of uctodata 0.5:";;
esac
cat <<\_ACEOF
@@ -1341,7 +1353,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-uctodata configure 0.4
+uctodata configure 0.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1358,7 +1370,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by uctodata $as_me 0.4, which was
+It was created by uctodata $as_me 0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2221,7 +2233,7 @@ fi
# Define the identity of the package.
PACKAGE='uctodata'
- VERSION='0.4'
+ VERSION='0.5'
cat >>confdefs.h <<_ACEOF
@@ -2880,7 +2892,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by uctodata $as_me 0.4, which was
+This file was extended by uctodata $as_me 0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2933,7 +2945,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-uctodata config.status 0.4
+uctodata config.status 0.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 7144f2e..11b8c86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([uctodata], [0.4], [lamasoftware at science.ru.nl])
+AC_INIT([uctodata], [0.5], [lamasoftware at science.ru.nl])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([configure.ac])
AC_PROG_LN_S
diff --git a/install-sh b/install-sh
index 0b0fdcb..59990a1 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2013-12-25.23; # UTC
+scriptversion=2014-09-12.12; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -324,34 +324,41 @@ do
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
+ # $RANDOM is not portable (e.g. dash); use it when possible to
+ # lower collision chance
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
+ # create the $tmpdir first (and fail if unsuccessful) to make sure
+ # that nobody tries to guess the $tmpdir name.
if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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"`
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_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"`
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
- rmdir "$tmpdir/d" "$tmpdir"
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/uctodata.git
More information about the debian-science-commits
mailing list