Mercurial > ec-dotfiles
view bin/artisan @ 598:b5a6cbb54a22
Update license (year and wording)
author | nanaya <me@myconan.net> |
---|---|
date | Sat, 25 Mar 2017 18:01:10 +0900 |
parents | 2ac0fa5ba73c |
children | cd80bafc1257 |
line wrap: on
line source
#!/bin/sh # License: MIT (nanaya <me@myconan.net>) # starts up artisan wherever set -e set -u _artisan_path="$(basename "${0}")" if [ ! -f "${_artisan_path}" ]; then _git_root="$(git rev-parse --show-toplevel 2> /dev/null || true)" _hg_root="$(hg root 2> /dev/null || true)" for i in "${_git_root}" "${_hg_root}"; do [ "${i}" = "" ] && continue _new_artisan_path="${i}/${_artisan_path}" if [ -f "${_new_artisan_path}" ]; then _artisan_path="${_new_artisan_path}" break fi done fi exec php "${_artisan_path}" "${@}"