top | item 30780827

(no title)

techthumb | 4 years ago

    #!/bin/sh

    set -e

    if [ -n "$VERBOSE" ]; then
      set -x
    fi

    if [ "$1" = "--show" ] && [ $2 = "twitter" ]; then
      echo "https://twitter.com/teaxyz_"
    elif [ -n "$1" ]; then
      # Hi, I know you’re excited but genuinely, pls wait for release
      # I added this so I can do CI :/
      case $(uname) in
        Darwin) suffix=macOS-aarch64;;
        Linux)  suffix=linux-x86-64;;
        *)
          echo "unsupported OS or architecture" >&2
          exit 1;;
      esac

      if [ "$1" = "brew" ]; then
        d="$HOME"/.tea/bin
        mkdir -p "$d"
        curl https://tea.xyz/dist/tea-$suffix -o "$d"/tea
        echo "$d" >> $GITHUB_PATH
      else
        mkdir opt
        curl https://tea.xyz/dist/tea-$suffix -o ./opt/tea
        chmod u+x ./opt/tea
        shift
        ./opt/tea "$@"
      fi
    else
      echo
      echo "418 I’m a teapot"
      echo
      echo "thanks for your interest in tea."
      echo "alas, we’re not quite ready to serve you yet."
      echo
      echo "while you wait why not follow us on Twitter:"
      echo
      echo '    open $(sh <(curl tea.xyz) --show twitter)'
      echo
    fi

discuss

order