Skip to content

Commit

Permalink
Fix nested test condition
Browse files Browse the repository at this point in the history
Previous version was causing this error:

beaver-install: line 16: test: too many arguments
  • Loading branch information
Mihails Strasuns authored and leandro-lucarella-sociomantic committed Jul 9, 2018
1 parent 229ef90 commit f811686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/beaver-install
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ maybe_cp()
{
# Don't do anything if both src and dst are the same, or if src doesn't
# exist
if test "$(readlink -m "$1")" != "$(readlink -m "$2")" -a test -f "$1"
if test "$(readlink -m "$1")" != "$(readlink -m "$2")" -a -f "$1"
then
cp -v "$1" "$2"
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/dlang/install
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ esac
# Copy a file only if it exist
maybe_cp()
{
if test "$(readlink -m "$1")" != "$(readlink -m "$2")" -a test -f "$1"
if test "$(readlink -m "$1")" != "$(readlink -m "$2")" -a -f "$1"
then
cp -v "$1" "$2"
fi
Expand Down

0 comments on commit f811686

Please sign in to comment.