File: using-these

package info (click to toggle)
dgit 13.19
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,084 kB
  • sloc: perl: 13,953; sh: 7,268; makefile: 340; python: 334; tcl: 69
file content (21 lines) | stat: -rwxr-xr-x 410 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
set -e
d="${0%/*}"
case "$d" in
    /*) ;;
    *) d="$PWD/$d" ;;
esac
: ${DGIT_VERSION:=$(
    exec 2>&1 # if we fail at this, use the error message as the version
    set -e
    cd "$d"
    printf "git:"
    git-describe --dirty=+ 2>/dev/null ||
    git rev-parse HEAD
)}
export DGIT_VERSION
PERLLIB=$d${PERLLIB:+:}${PERLLIB}
export PERLLIB
PATH=$d:$d/infra${PATH:+:}${PATH}
export PATH
exec "$@"