catalyst-auto: set up a default GITDIR for scripts

Rather than hardcode system-specific paths, let catalyst-auto probe
the current git dir based on its script name.
This commit is contained in:
Mike Frysinger 2014-09-10 15:58:54 -04:00
parent 187e786116
commit a05155c18b
3 changed files with 2 additions and 4 deletions

View file

@ -123,6 +123,8 @@ if [ -z "${config_file}" -o ! -e "${config_file}" ]; then
exit 1
fi
# Probe the default gitdir from this script name.
GITDIR=$(dirname "$(dirname "$(realpath "$0")")")
source ${config_file}
TMPDIR=$(mktemp -d --tmpdir="${TMP_PATH:-/tmp}" catalyst-auto.XXXXXX)

View file

@ -1,8 +1,6 @@
# This is the config file for the catalyst-auto script. It should be pretty
# self-explanatory.
GITDIR=/root/releng/
SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390
SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`

View file

@ -1,8 +1,6 @@
# This is the config file for the catalyst-auto script. It should be pretty
# self-explanatory.
GITDIR=/root/releng/
SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390x
SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`