aboutsummaryrefslogtreecommitdiff
path: root/slave
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-08-06 07:52:00 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-08-06 07:52:00 +0530
commit26e8f0b19d4b6bbf13c7b7a70bddb67c6550ba72 (patch)
treed80bc11b0bac279bc039c1e8ce61537caf303a8d /slave
parentJust spent the better part of an hour tracing a regression that turned out to... (diff)
downloadautotua-26e8f0b19d4b6bbf13c7b7a70bddb67c6550ba72.tar.gz
autotua-26e8f0b19d4b6bbf13c7b7a70bddb67c6550ba72.tar.bz2
autotua-26e8f0b19d4b6bbf13c7b7a70bddb67c6550ba72.zip
Initialise some basic variables: ATOMS, P, PN, PV
Diffstat (limited to 'slave')
-rw-r--r--slave/autotua/bin/jobuild-functions.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/slave/autotua/bin/jobuild-functions.sh b/slave/autotua/bin/jobuild-functions.sh
index c146a1b..5dd2749 100644
--- a/slave/autotua/bin/jobuild-functions.sh
+++ b/slave/autotua/bin/jobuild-functions.sh
@@ -14,6 +14,24 @@ die() {
exit 1
}
+jvars() {
+ P=${jobuild##*/}
+ P=${P%.jobuild}
+ PN=${P%-*}
+ PV=${P##*-}
+}
+
+atoms() {
+ local temp
+ temp="${jobuild%/*}/conf/${P}.atoms"
+ [ -f "${temp}" ] && ATOMS=$(<"${temp}")
+}
+
+initialize() {
+ jvars
+ atoms
+}
+
has() {
local this=${1}; shift
local those=${@}
@@ -43,7 +61,7 @@ unpack() {
[ ! -s "${srcdir}${x}" ] && die "$myfail: empty file"
[ "${x/${JOBFILES_DIR}}" != "${x}" ] && \
- die "Arguments to unpack() should not begin with \${DISTDIR}."
+ die "Arguments to unpack() should not begin with \${JOBFILES_DIR}."
case "${x}" in
*.tar)
@@ -108,6 +126,7 @@ get_param() {
# Param to extract
local param="${1}"
local jobuild="${2}"
+ initialise
if ! source "${jobuild}"; then
die "Unable to source ${jobuild}"
@@ -121,6 +140,7 @@ get_jobuild_path() {
run_all_phases() {
local jobuild="${1}"
+ initialise
if ! source "${jobuild}"; then
die "Unable to source ${jobuild}"