Avail script dir in progdir and add it to PATH

pull/321/head
Eugene Kim 6 years ago
parent dddd104b4f
commit 887fdbc1a5
  1. 10
      scripts/travis_checker.sh

@ -12,8 +12,16 @@ print_file() {
echo "--- END ${2} ---"
}
unset -v ok tmpdir go_files go_dirs goimports_output golint_output
unset -v ok tmpdir go_files go_dirs goimports_output golint_output progdir
ok=true
case "${0}" in
*/*) progdir="${0%/*}";;
*) progdir=.;;
esac
PATH="${PATH+"${PATH}:"}${progdir}"
export PATH
tmpdir=
trap 'case "${tmpdir}" in ?*) rm -rf "${tmpdir}";; esac' EXIT
tmpdir=$(mktemp -d)

Loading…
Cancel
Save