File: run

package info (click to toggle)
tiarra 20100212-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,732 kB
  • ctags: 1,712
  • sloc: perl: 32,032; lisp: 193; sh: 109; makefile: 10
file content (29 lines) | stat: -rwxr-xr-x 707 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# $Id: run 3010 2007-12-10 13:36:55Z topia $
# copyright (C) 2004 Topia <topia@clovery.jp>. all rights reserved.

THISDIR="${THISDIR-$(dirname $0)}"
[ "0${DEBUG}" -ge 1 ] && echo "${THISDIR}/run: start"

# override
WORKDIR="${WORKDIR:-${THISDIR}}"
if [ -z "${TOPDIR}" ]; then
  TOPDIR=.
else
  TOPDIR="${TOPDIR}/.."
fi
TOPDIR="${TOPDIR#./}"

[ "0${DEBUG}" -ge 2 ] && echo "${THISDIR}/run: read tiarrarc"
[ -f "${THISDIR}/.tiarrarc" ] && . "${THISDIR}/.tiarrarc"
if [ -f "${THISDIR}/.tiarrarc-once" ]; then
  . "${THISDIR}/.tiarrarc-once"
  rm -f "${THISDIR}/.tiarrarc-once"
fi

if [ -f "${THISDIR}/run-main" ]; then
  . "${THISDIR}/run-main"
else
  THISDIR="${THISDIR}/.."
  . "${THISDIR}/run"
fi