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:
parent
187e786116
commit
a05155c18b
3 changed files with 2 additions and 4 deletions
|
@ -123,6 +123,8 @@ if [ -z "${config_file}" -o ! -e "${config_file}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Probe the default gitdir from this script name.
|
||||||
|
GITDIR=$(dirname "$(dirname "$(realpath "$0")")")
|
||||||
source ${config_file}
|
source ${config_file}
|
||||||
|
|
||||||
TMPDIR=$(mktemp -d --tmpdir="${TMP_PATH:-/tmp}" catalyst-auto.XXXXXX)
|
TMPDIR=$(mktemp -d --tmpdir="${TMP_PATH:-/tmp}" catalyst-auto.XXXXXX)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
# This is the config file for the catalyst-auto script. It should be pretty
|
# This is the config file for the catalyst-auto script. It should be pretty
|
||||||
# self-explanatory.
|
# self-explanatory.
|
||||||
|
|
||||||
GITDIR=/root/releng/
|
|
||||||
|
|
||||||
SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390
|
SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390
|
||||||
SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`
|
SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
# This is the config file for the catalyst-auto script. It should be pretty
|
# This is the config file for the catalyst-auto script. It should be pretty
|
||||||
# self-explanatory.
|
# self-explanatory.
|
||||||
|
|
||||||
GITDIR=/root/releng/
|
|
||||||
|
|
||||||
SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390x
|
SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390x
|
||||||
SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`
|
SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue