[PATCH RFC aiaiai 01/11] aiaiai: fixup srcdir in email and gerrit scripts

Jacob Keller jacob.e.keller at intel.com
Thu Mar 27 11:39:59 PDT 2014


$srcdir should represent the current directory where the actual shell
file is located. This requires also updating $PATH so that it points to
the correct directories. This is somewhat confusing since we have to add
'..' to a section, but it fixes the switch to dash check for email
scripts which previously was broken. It also makes everything more
consistent.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
---
 email/aiaiai-email-dispatcher        | 4 ++--
 email/aiaiai-email-dispatcher-helper | 4 ++--
 email/aiaiai-email-lda               | 4 ++--
 email/aiaiai-email-test-patchset     | 4 ++--
 gerrit/aiaiai-jenkins-test-patchset  | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/email/aiaiai-email-dispatcher b/email/aiaiai-email-dispatcher
index d31e88ebb226..caf66a88dcf7 100755
--- a/email/aiaiai-email-dispatcher
+++ b/email/aiaiai-email-dispatcher
@@ -4,8 +4,8 @@
 # Author: Artem Bityutskiy
 # License: GPLv2
 
-srcdir="$(readlink -ev -- ${0%/*}/..)"
-PATH="$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH"
+srcdir="$(readlink -ev -- ${0%/*})"
+PATH="$srcdir:$srcdir/..:$srcdir/../helpers:$srcdir/../helpers/libshell:$PATH"
 
 echo $PATH
 . shell-error
diff --git a/email/aiaiai-email-dispatcher-helper b/email/aiaiai-email-dispatcher-helper
index 018c0d4cdc9b..5b851cd1421c 100755
--- a/email/aiaiai-email-dispatcher-helper
+++ b/email/aiaiai-email-dispatcher-helper
@@ -4,8 +4,8 @@
 # Author: Artem Bityutskiy
 # License: GPLv2
 
-srcdir="$(readlink -ev -- ${0%/*}/..)"
-PATH="$srcdir/helpers:$srcdir/email:$srcdir/libshell:$PATH"
+srcdir="$(readlink -ev -- ${0%/*})"
+PATH="$srcdir:$srcdir/..:$srcdir/../helpers:$srcdir/../helpers/libshell:$PATH"
 
 . shell-error
 . shell-signal
diff --git a/email/aiaiai-email-lda b/email/aiaiai-email-lda
index 5db3f15e9918..8d65ae2d7f8c 100755
--- a/email/aiaiai-email-lda
+++ b/email/aiaiai-email-lda
@@ -4,8 +4,8 @@
 # Author: Artem Bityutskiy
 # License: GPLv2
 
-srcdir="$(readlink -ev -- ${0%/*}/..)"
-PATH="$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH"
+srcdir="$(readlink -ev -- ${0%/*})"
+PATH="$srcdir:$srcdir/..:$srcdir/../helpers:$srcdir/../helpers/libshell:$PATH"
 
 . shell-error
 . shell-args
diff --git a/email/aiaiai-email-test-patchset b/email/aiaiai-email-test-patchset
index 3a7eb77d0b2b..c02b331387d0 100755
--- a/email/aiaiai-email-test-patchset
+++ b/email/aiaiai-email-test-patchset
@@ -4,8 +4,8 @@
 # Author: Artem Bityutskiy
 # License: GPLv2
 
-srcdir="$(readlink -ev -- ${0%/*}/..)"
-PATH="$srcdir:$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH"
+srcdir="$(readlink -ev -- ${0%/*})"
+PATH="$srcdir:$srcdir/..:$srcdir/../helpers:$srcdir/../helpers/libshell:$PATH"
 
 . shell-error
 . shell-args
diff --git a/gerrit/aiaiai-jenkins-test-patchset b/gerrit/aiaiai-jenkins-test-patchset
index 53da26e22e5b..629bfcb800a8 100755
--- a/gerrit/aiaiai-jenkins-test-patchset
+++ b/gerrit/aiaiai-jenkins-test-patchset
@@ -4,8 +4,8 @@
 # Author: Artem Bityutskiy
 # License: GPLv2
 
-srcdir="$(readlink -ev -- ${0%/*}/..)"
-PATH="$srcdir:$srcdir/helpers/libshell:$PATH"
+srcdir="$(readlink -ev -- ${0%/*})"
+PATH="$srcdir:$srcdir/..:$srcdir/../helpers:$srcdir/../helpers/libshell:$PATH"
 
 . shell-error
 . shell-args
-- 
1.8.3.1




More information about the aiaiai mailing list