diff options
| author | Paul Eggert | 2017-08-21 15:34:07 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-08-21 15:34:50 -0700 |
| commit | 891bc9822bdd9893ddf2d4fd65fd53a5da001beb (patch) | |
| tree | 32edbf675bde8ed4b92caf35f81fa477ad382e9e | |
| parent | 80fccd4290ae134bd1b3d377f134bb9143b68b43 (diff) | |
| download | emacs-891bc9822bdd9893ddf2d4fd65fd53a5da001beb.tar.gz emacs-891bc9822bdd9893ddf2d4fd65fd53a5da001beb.zip | |
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.
| -rwxr-xr-x | autogen.sh | 8 | ||||
| -rwxr-xr-x | build-aux/git-hooks/pre-commit | 2 | ||||
| -rwxr-xr-x | build-aux/gitlog-to-emacslog | 4 | ||||
| -rwxr-xr-x | make-dist | 12 |
4 files changed, 13 insertions, 13 deletions
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 | |||
| 115 | do_check=false;; | 115 | do_check=false;; |
| 116 | all) | 116 | all) |
| 117 | do_autoconf=true | 117 | do_autoconf=true |
| 118 | test -e .git && do_git=true;; | 118 | test -r .git && do_git=true;; |
| 119 | autoconf) | 119 | autoconf) |
| 120 | do_autoconf=true;; | 120 | do_autoconf=true;; |
| 121 | git) | 121 | git) |
| @@ -128,7 +128,7 @@ done | |||
| 128 | case $do_autoconf,$do_git in | 128 | case $do_autoconf,$do_git in |
| 129 | false,false) | 129 | false,false) |
| 130 | do_autoconf=true | 130 | do_autoconf=true |
| 131 | test -e .git && do_git=true;; | 131 | test -r .git && do_git=true;; |
| 132 | esac | 132 | esac |
| 133 | 133 | ||
| 134 | # Generate Autoconf-related files, if requested. | 134 | # Generate Autoconf-related files, if requested. |
| @@ -294,7 +294,7 @@ git_config () | |||
| 294 | # Get location of Git's common configuration directory. For older Git | 294 | # Get location of Git's common configuration directory. For older Git |
| 295 | # versions this is just '.git'. Newer Git versions support worktrees. | 295 | # versions this is just '.git'. Newer Git versions support worktrees. |
| 296 | 296 | ||
| 297 | { test -e .git && | 297 | { test -r .git && |
| 298 | git_common_dir=`git rev-parse --no-flags --git-common-dir 2>/dev/null` && | 298 | git_common_dir=`git rev-parse --no-flags --git-common-dir 2>/dev/null` && |
| 299 | test -n "$git_common_dir" | 299 | test -n "$git_common_dir" |
| 300 | } || git_common_dir=.git | 300 | } || git_common_dir=.git |
| @@ -377,7 +377,7 @@ fi | |||
| 377 | 377 | ||
| 378 | if test ! -f configure; then | 378 | if test ! -f configure; then |
| 379 | echo "You can now run '$0 autoconf'." | 379 | echo "You can now run '$0 autoconf'." |
| 380 | elif test -e .git && test $git_was_ok = false && test $do_git = false; then | 380 | elif test -r .git && test $git_was_ok = false && test $do_git = false; then |
| 381 | echo "You can now run '$0 git'." | 381 | echo "You can now run '$0 git'." |
| 382 | elif test ! -f config.status || | 382 | elif test ! -f config.status || |
| 383 | test -n "`find configure src/config.in -newer config.status`"; then | 383 | 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 | |||
| 28 | # When doing a two-way merge, ignore problems that came from the other | 28 | # When doing a two-way merge, ignore problems that came from the other |
| 29 | # side of the merge. | 29 | # side of the merge. |
| 30 | head=HEAD | 30 | head=HEAD |
| 31 | if test -e "$GIT_DIR"/MERGE_HEAD; then | 31 | if test -r "$GIT_DIR"/MERGE_HEAD; then |
| 32 | merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit | 32 | merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit |
| 33 | for merge_head in $merge_heads; do | 33 | for merge_head in $merge_heads; do |
| 34 | case $head in | 34 | 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 | |||
| 68 | fi | 68 | fi |
| 69 | 69 | ||
| 70 | # If this is not a Git repository, just generate an empty ChangeLog. | 70 | # If this is not a Git repository, just generate an empty ChangeLog. |
| 71 | test -e .git || { | 71 | test -r .git || { |
| 72 | >"$output" | 72 | >"$output" |
| 73 | exit | 73 | exit |
| 74 | } | 74 | } |
| @@ -81,7 +81,7 @@ test -e .git || { | |||
| 81 | --ignore-line='^; ' --format='%B' \ | 81 | --ignore-line='^; ' --format='%B' \ |
| 82 | "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit | 82 | "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit |
| 83 | 83 | ||
| 84 | if test -e "ChangeLog.tmp"; then | 84 | if test -r "ChangeLog.tmp"; then |
| 85 | 85 | ||
| 86 | # Fix up bug references. | 86 | # Fix up bug references. |
| 87 | # This would be better as eg a --transform option to gitlog-to-changelog, | 87 | # This would be better as eg a --transform option to gitlog-to-changelog, |
| @@ -240,7 +240,7 @@ if [ $check = yes ]; then | |||
| 240 | bogosities= | 240 | bogosities= |
| 241 | while read elc; do | 241 | while read elc; do |
| 242 | el=`echo $elc | sed 's/c$//'` | 242 | el=`echo $elc | sed 's/c$//'` |
| 243 | [ -e $el ] || continue | 243 | [ -r $el ] || continue |
| 244 | [ $elc -nt $el ] || bogosities="$bogosities $elc" | 244 | [ $elc -nt $el ] || bogosities="$bogosities $elc" |
| 245 | done < /tmp/elc | 245 | done < /tmp/elc |
| 246 | 246 | ||
| @@ -278,7 +278,7 @@ if [ $check = yes ]; then | |||
| 278 | info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'` | 278 | info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'` |
| 279 | [ x"${info}" != x"" ] || continue | 279 | [ x"${info}" != x"" ] || continue |
| 280 | info=info/$info | 280 | info=info/$info |
| 281 | [ -e $info ] || continue | 281 | [ -r $info ] || continue |
| 282 | [ $info -nt $texi ] || bogosities="$bogosities $info" | 282 | [ $info -nt $texi ] || bogosities="$bogosities $info" |
| 283 | done < /tmp/el | 283 | done < /tmp/el |
| 284 | 284 | ||
| @@ -292,7 +292,7 @@ if [ $check = yes ]; then | |||
| 292 | 292 | ||
| 293 | ## This exits with non-zero status if any .info files need | 293 | ## This exits with non-zero status if any .info files need |
| 294 | ## rebuilding. | 294 | ## rebuilding. |
| 295 | if [ -e Makefile ]; then | 295 | if [ -r Makefile ]; then |
| 296 | echo "Checking to see if info files are up-to-date..." | 296 | echo "Checking to see if info files are up-to-date..." |
| 297 | make --question info || error=yes | 297 | make --question info || error=yes |
| 298 | fi | 298 | fi |
| @@ -300,7 +300,7 @@ if [ $check = yes ]; then | |||
| 300 | ## Is this a release? | 300 | ## Is this a release? |
| 301 | case $version in | 301 | case $version in |
| 302 | [1-9][0-9].[0-9]) | 302 | [1-9][0-9].[0-9]) |
| 303 | if [ -e ChangeLog ]; then | 303 | if [ -r ChangeLog ]; then |
| 304 | if ! grep -q "Version $version released" ChangeLog; then | 304 | if ! grep -q "Version $version released" ChangeLog; then |
| 305 | echo "No release notice in ChangeLog" | 305 | echo "No release notice in ChangeLog" |
| 306 | error=yes | 306 | error=yes |
| @@ -359,10 +359,10 @@ echo "Creating top directory: '${tempdir}'" | |||
| 359 | mkdir ${tempdir} | 359 | mkdir ${tempdir} |
| 360 | 360 | ||
| 361 | if [ "$changelog" = yes ]; then | 361 | if [ "$changelog" = yes ]; then |
| 362 | if test -e .git; then | 362 | if test -r .git; then |
| 363 | ## When making a release or pretest the ChangeLog should already | 363 | ## When making a release or pretest the ChangeLog should already |
| 364 | ## have been created and edited as needed. Don't ignore it. | 364 | ## have been created and edited as needed. Don't ignore it. |
| 365 | if test -e ChangeLog; then | 365 | if test -r ChangeLog; then |
| 366 | echo "Using existing top-level ChangeLog" | 366 | echo "Using existing top-level ChangeLog" |
| 367 | else | 367 | else |
| 368 | echo "Making top-level ChangeLog" | 368 | echo "Making top-level ChangeLog" |