From: Paul Eggert Date: Mon, 21 Aug 2017 22:34:07 +0000 (-0700) Subject: Port /bin/sh scripts to Solaris 10 X-Git-Tag: emacs-26.0.90~381 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=891bc9822bdd9893ddf2d4fd65fd53a5da001beb;p=emacs.git Port /bin/sh scripts to Solaris 10 Its /bin/sh builtin ‘test’ command does not support -e. * autogen.sh, build-aux/git-hooks/pre-commit: * build-aux/gitlog-to-emacslog, make-dist: Use test -r, not test -e. --- diff --git a/autogen.sh b/autogen.sh index d454e41ea75..0d00d56762a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -115,7 +115,7 @@ for arg; do do_check=false;; all) do_autoconf=true - test -e .git && do_git=true;; + test -r .git && do_git=true;; autoconf) do_autoconf=true;; git) @@ -128,7 +128,7 @@ done case $do_autoconf,$do_git in false,false) do_autoconf=true - test -e .git && do_git=true;; + test -r .git && do_git=true;; esac # Generate Autoconf-related files, if requested. @@ -294,7 +294,7 @@ git_config () # Get location of Git's common configuration directory. For older Git # versions this is just '.git'. Newer Git versions support worktrees. -{ test -e .git && +{ test -r .git && git_common_dir=`git rev-parse --no-flags --git-common-dir 2>/dev/null` && test -n "$git_common_dir" } || git_common_dir=.git @@ -377,7 +377,7 @@ fi if test ! -f configure; then echo "You can now run '$0 autoconf'." -elif test -e .git && test $git_was_ok = false && test $do_git = false; then +elif test -r .git && test $git_was_ok = false && test $do_git = false; then echo "You can now run '$0 git'." elif test ! -f config.status || test -n "`find configure src/config.in -newer config.status`"; then diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit index 548bf933f0c..0fa5837f602 100755 --- a/build-aux/git-hooks/pre-commit +++ b/build-aux/git-hooks/pre-commit @@ -28,7 +28,7 @@ exec >&2 # When doing a two-way merge, ignore problems that came from the other # side of the merge. head=HEAD -if test -e "$GIT_DIR"/MERGE_HEAD; then +if test -r "$GIT_DIR"/MERGE_HEAD; then merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit for merge_head in $merge_heads; do case $head in diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index 482b8dbe5dc..bced7e49861 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog @@ -68,7 +68,7 @@ if [ -f "$output" ]; then fi # If this is not a Git repository, just generate an empty ChangeLog. -test -e .git || { +test -r .git || { >"$output" exit } @@ -81,7 +81,7 @@ test -e .git || { --ignore-line='^; ' --format='%B' \ "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit -if test -e "ChangeLog.tmp"; then +if test -r "ChangeLog.tmp"; then # Fix up bug references. # This would be better as eg a --transform option to gitlog-to-changelog, diff --git a/make-dist b/make-dist index eb81a144ebf..b4667843ce4 100755 --- a/make-dist +++ b/make-dist @@ -240,7 +240,7 @@ if [ $check = yes ]; then bogosities= while read elc; do el=`echo $elc | sed 's/c$//'` - [ -e $el ] || continue + [ -r $el ] || continue [ $elc -nt $el ] || bogosities="$bogosities $elc" done < /tmp/elc @@ -278,7 +278,7 @@ if [ $check = yes ]; then info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'` [ x"${info}" != x"" ] || continue info=info/$info - [ -e $info ] || continue + [ -r $info ] || continue [ $info -nt $texi ] || bogosities="$bogosities $info" done < /tmp/el @@ -292,7 +292,7 @@ if [ $check = yes ]; then ## This exits with non-zero status if any .info files need ## rebuilding. - if [ -e Makefile ]; then + if [ -r Makefile ]; then echo "Checking to see if info files are up-to-date..." make --question info || error=yes fi @@ -300,7 +300,7 @@ if [ $check = yes ]; then ## Is this a release? case $version in [1-9][0-9].[0-9]) - if [ -e ChangeLog ]; then + if [ -r ChangeLog ]; then if ! grep -q "Version $version released" ChangeLog; then echo "No release notice in ChangeLog" error=yes @@ -359,10 +359,10 @@ echo "Creating top directory: '${tempdir}'" mkdir ${tempdir} if [ "$changelog" = yes ]; then - if test -e .git; then + if test -r .git; then ## When making a release or pretest the ChangeLog should already ## have been created and edited as needed. Don't ignore it. - if test -e ChangeLog; then + if test -r ChangeLog; then echo "Using existing top-level ChangeLog" else echo "Making top-level ChangeLog"