Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ac6deff8327a
Choose a base ref
...
head repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5aa3b15d04f6
Choose a head ref
  • 4 commits
  • 1 file changed
  • 1 contributor

Commits on May 12, 2017

  1. Don't support colors if tput is not available

    The Docker image doesn't have tput available
    matiasgarciaisaia committed May 12, 2017
    Copy the full SHA
    96f03e4 View commit details
  2. Wrapper script is POSIX sh compatible

    There were some bashisms left that became a bug since #3809
    matiasgarciaisaia committed May 12, 2017
    Copy the full SHA
    9223caa View commit details

Commits on May 13, 2017

  1. Copy the full SHA
    6f8f2f2 View commit details

Commits on May 23, 2017

  1. Merge pull request #4410 from matiasgarciaisaia/wrapper-bashisms

    Wrapper script has some bashisms left
    matiasgarciaisaia authored May 23, 2017
    Copy the full SHA
    5aa3b15 View commit details
Showing with 5 additions and 10 deletions.
  1. +5 −10 bin/crystal
15 changes: 5 additions & 10 deletions bin/crystal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh

################## https://github.com/mkropat/sh-realpath #####################
#
@@ -94,27 +94,22 @@ _canonicalize_file_path() {

##############################################################################

# Based on http://stackoverflow.com/a/2108540/2199687
# Based on http://stackoverflow.com/q/370047/641451
remove_path_item() {
local path item work
local path item

path="$1"
item="$2"

work=":$path:"
work="${work/:$item:/:}"
work="${work%:}"
work="${work#:}"

echo "$work"
echo -n $path | awk -v RS=: -v ORS=: '$0 != "'$item'"' | sed 's/:$//'
}

##############################################################################

__has_colors() {
local num_colors=$(tput colors 2>/dev/null)

if [ "$num_colors" -gt 2 ]; then
if [ -n "$num_colors" ] && [ "$num_colors" -gt 2 ]; then
return 0
else
return 1