mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
build: Make autogen.sh more POSIX friendly.
* autogen.sh: Replace non POSIX "cp -a" and "head -c". -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
97372b39cd
commit
3c00b52f7c
@ -225,7 +225,7 @@ if [ "$myhost" = "find-version" ]; then
|
|||||||
fi
|
fi
|
||||||
[ -n "$tmp" ] && beta=yes
|
[ -n "$tmp" ] && beta=yes
|
||||||
rev=$(git rev-parse --short HEAD | tr -d '\n\r')
|
rev=$(git rev-parse --short HEAD | tr -d '\n\r')
|
||||||
rvd=$((0x$(echo ${rev} | head -c 4)))
|
rvd=$((0x$(echo ${rev} | dd bs=1 count=2 2>/dev/null)))
|
||||||
else
|
else
|
||||||
ingit=no
|
ingit=no
|
||||||
beta=yes
|
beta=yes
|
||||||
@ -417,8 +417,11 @@ fi
|
|||||||
|
|
||||||
# Check the git setup.
|
# Check the git setup.
|
||||||
if [ -d .git ]; then
|
if [ -d .git ]; then
|
||||||
CP="cp -a"
|
CP="cp -p"
|
||||||
[ -z "${SILENT}" ] && CP="$CP -v"
|
# If we have a GNU cp we can add -v
|
||||||
|
if cp --version >/dev/null 2>/dev/null; then
|
||||||
|
[ -z "${SILENT}" ] && CP="$CP -v"
|
||||||
|
fi
|
||||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||||
[ -z "${SILENT}" ] && cat <<EOF
|
[ -z "${SILENT}" ] && cat <<EOF
|
||||||
*** Activating trailing whitespace git pre-commit hook. ***
|
*** Activating trailing whitespace git pre-commit hook. ***
|
||||||
|
Loading…
x
Reference in New Issue
Block a user