glib/glib/libcharset/update.sh
Philip Withnall c5d661b4c4 build: Fix shellcheck warnings in various old build and test scripts
Most of these scripts can probably just be deleted (see issue #2045),
but for now it was easier to just mechanically fix the shellcheck
warnings in them, rather than think about whether we actually needed the
script.

Fixes done using shellcheck 0.7.0 with default options. I haven’t tested
any of the changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 10:33:45 +00:00

34 lines
679 B
Bash
Executable File

#!/bin/sh
if test $# = 1 ; then
ORIGINAL=$1
else
echo "Usage: update.sh /path/to/libcharset" 1>&2
exit 1
fi
if test -f "${ORIGINAL}/lib/localcharset.c" ; then : ; else
echo "Usage: update.sh /path/to/libcharset" 1>&2
exit 1
fi
VERSION=$(grep VERSION= "${ORIGINAL}/configure.ac" | sed s/VERSION=//)
for i in localcharset.c ref-add.sin ref-del.sin config.charset ; do
cp "${ORIGINAL}/lib/${i}" .
done
for i in libcharset.h localcharset.h ; do
cp "${ORIGINAL}/include/${i}.in" "./${i}"
done
for i in codeset.m4 glibc21.m4 ; do
cp "${ORIGINAL}/m4/${i}" .
done
patch -p0 < libcharset-glib.patch
echo "dnl From libcharset ${VERSION}" > ../../aclibcharset.m4