summaryrefslogtreecommitdiff
path: root/gettext-tools/misc/add-to-archive
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-12-24 07:38:37 +0000
committer <>2015-02-02 12:02:29 +0000
commit482840e61f86ca321838a91e902c41d40c098bbb (patch)
tree01ea2e242fd2792d19fe192476601587901db794 /gettext-tools/misc/add-to-archive
downloadgettext-tarball-482840e61f86ca321838a91e902c41d40c098bbb.tar.gz
Imported from /home/lorry/working-area/delta_gettext-tarball/gettext-0.19.4.tar.xz.gettext-0.19.4
Diffstat (limited to 'gettext-tools/misc/add-to-archive')
-rwxr-xr-xgettext-tools/misc/add-to-archive101
1 files changed, 101 insertions, 0 deletions
diff --git a/gettext-tools/misc/add-to-archive b/gettext-tools/misc/add-to-archive
new file mode 100755
index 0000000..ccc7f46
--- /dev/null
+++ b/gettext-tools/misc/add-to-archive
@@ -0,0 +1,101 @@
+#! /bin/sh
+#
+# Copyright (C) 2002, 2006, 2009-2010 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 <http://www.gnu.org/licenses/>.
+#
+
+# Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz
+# Adds the infrastructure files for gettext version 0.xx.yy to the reposutory
+# in the archive.dir.tar file.
+
+if test $# != 1; then
+ echo "Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz"
+ exit 1
+fi
+
+sourcetgz="$1"
+case "$sourcetgz" in
+ *.tar.gz) ;;
+ *) echo "$0: first argument should be a gettext release tar.gz file"; exit 1;;
+esac
+
+pack_ver=`basename "$sourcetgz" | sed -e 's/\.tar\.gz$//'`
+if test -d "$pack_ver"; then
+ echo "$0: directory $pack_ver already exists"; exit 1
+fi
+pack=`echo "$pack_ver" | sed -e 's/^\([^-]*\)-.*/\1/'`
+ver=`echo "$pack_ver" | sed -e 's/^[^-]*-\(.*\)/\1/'`
+
+# Unpack, build and install the source distribution.
+myprefix=`pwd`/${pack_ver}-inst
+gunzip -c < "$sourcetgz" | tar xvf -
+cd $pack_ver
+./configure --prefix="$myprefix"
+make
+make install
+cd ..
+rm -rf $pack_ver
+
+# Copy the relevant files into an empty directory.
+work_dir=tmpwrk$$
+mkdir "$work_dir"
+mkdir "$work_dir/archive"
+work_archive=`pwd`/"$work_dir/archive"
+(cd "$myprefix"/share/gettext
+ for file in *; do
+ case $file in
+ ABOUT-NLS)
+ cp -p $file "$work_archive/$file" ;;
+ config.rpath)
+ cp -p $file "$work_archive/$file" ;;
+ esac
+ done
+ mkdir "$work_archive/intl"
+ cd intl
+ for file in *; do
+ if test $file != COPYING.LIB-2 && test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
+ cp -p $file "$work_archive/intl/$file"
+ fi
+ done
+ cd ..
+ mkdir "$work_archive/po"
+ cd po
+ for file in *; do
+ if test $file != Makevars; then
+ cp -p $file "$work_archive/po/$file"
+ fi
+ done
+ cd ..
+ mkdir "$work_archive/m4"
+ cd "$myprefix"/share/aclocal
+ for file in *; do
+ cp -p $file "$work_archive/m4/$file"
+ done
+)
+
+# Add the contents of this directory to the repository.
+mkdir autopoint-files
+(cd autopoint-files && tar xf ../archive.dir.tar)
+mkdir autopoint-files/$pack_ver
+(cd "$work_archive" && tar cf - .) | (cd autopoint-files/$pack_ver && tar xf -)
+(cd autopoint-files && tar cf ../archive.dir.tar --owner=root --group=root *)
+
+# Clean up.
+rm -rf autopoint-files
+rm -rf "$work_dir"
+rm -f cvsuser.so
+rm -rf "$myprefix"
+
+exit 0