From c9a9f60d6b80e7d01870bbaab9236b82867f45d3 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 7 Feb 2014 15:00:36 +0200 Subject: [PATCH] Move internal scripts to the "helper" subdirectory This patch implements the following TODO entry: Re-arrange the source code structure so that the internal scripts would all sit in a separate sub-directory. Internal scripts are those which users are not supposed to run directly. For example, 'aiaiai-locker' is one of them. Signed-off-by: Artem Bityutskiy --- .gitignore | 2 +- Makefile | 4 ---- doc/TODO.txt | 4 ---- email/aiaiai-email-dispatcher | 3 ++- email/aiaiai-email-dispatcher-helper | 2 +- email/aiaiai-email-lda | 2 +- email/aiaiai-email-test-patchset | 2 +- gerrit/aiaiai-jenkins-test-patchset | 4 ++-- helpers/Makefile | 5 ++--- aiaiai-checker => helpers/aiaiai-checker | 2 +- aiaiai-decode-rfc-2047 => helpers/aiaiai-decode-rfc-2047 | 0 aiaiai-diff-log => helpers/aiaiai-diff-log | 2 +- aiaiai-diff-log-helper => helpers/aiaiai-diff-log-helper | 0 aiaiai-locker.c => helpers/aiaiai-locker.c | 0 aiaiai-make-kernel => helpers/aiaiai-make-kernel | 2 +- aiaiai-match-keywords => helpers/aiaiai-match-keywords | 2 +- aiaiai-sh-functions => helpers/aiaiai-sh-functions | 0 .../aiaiai-test-bisectability | 2 +- 18 files changed, 15 insertions(+), 23 deletions(-) rename aiaiai-checker => helpers/aiaiai-checker (98%) rename aiaiai-decode-rfc-2047 => helpers/aiaiai-decode-rfc-2047 (100%) rename aiaiai-diff-log => helpers/aiaiai-diff-log (98%) rename aiaiai-diff-log-helper => helpers/aiaiai-diff-log-helper (100%) rename aiaiai-locker.c => helpers/aiaiai-locker.c (100%) rename aiaiai-make-kernel => helpers/aiaiai-make-kernel (99%) rename aiaiai-match-keywords => helpers/aiaiai-match-keywords (97%) rename aiaiai-sh-functions => helpers/aiaiai-sh-functions (100%) rename aiaiai-test-bisectability => helpers/aiaiai-test-bisectability (99%) diff --git a/.gitignore b/.gitignore index 4361bc4..d707290 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -aiaiai-locker +helpers/aiaiai-locker helpers/remap-log diff --git a/Makefile b/Makefile index a6c722c..00039af 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,5 @@ -CFLAGS = -O2 -g -Wextra - all: - $(CC) $(CFLAGS) -o aiaiai-locker aiaiai-locker.c make -C helpers clean: - $(RM) aiaiai-locker make -C helpers clean diff --git a/doc/TODO.txt b/doc/TODO.txt index 7652d16..c5eed38 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -39,10 +39,6 @@ implementing them. instead of just failing. This is probably more user-friendly. * Describe some review policy, e.g., how many days I promise to wait for review/reply before applying patches. - * Re-arrange the source code structure so that the internal scripts - would all sit in a separate sub-directory. Internal scripts are - those which users are not supposed to run directly. For example, - 'aiaiai-locker' is one of them. * Functional improvements * Gcc 4.8 change the format of warnings and now they look like this: diff --git a/email/aiaiai-email-dispatcher b/email/aiaiai-email-dispatcher index 7487cd9..5920968 100755 --- a/email/aiaiai-email-dispatcher +++ b/email/aiaiai-email-dispatcher @@ -5,8 +5,9 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*}/..)" -PATH="$srcdir:$srcdir/email:$srcdir/helpers/libshell:$PATH" +PATH="$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH" +echo $PATH . shell-error . shell-args . shell-signal diff --git a/email/aiaiai-email-dispatcher-helper b/email/aiaiai-email-dispatcher-helper index 7d0365d..9dfe115 100755 --- a/email/aiaiai-email-dispatcher-helper +++ b/email/aiaiai-email-dispatcher-helper @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*}/..)" -PATH="$srcdir:$srcdir/email:$srcdir/helpers/libshell:$PATH" +PATH="$srcdir/helpers:$srcdir/email:$srcdir/libshell:$PATH" . shell-error . shell-signal diff --git a/email/aiaiai-email-lda b/email/aiaiai-email-lda index b9f2854..770f96e 100755 --- a/email/aiaiai-email-lda +++ b/email/aiaiai-email-lda @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*}/..)" -PATH="$srcdir:$srcdir/email:$srcdir/helpers/libshell:$PATH" +PATH="$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH" . shell-error . shell-args diff --git a/email/aiaiai-email-test-patchset b/email/aiaiai-email-test-patchset index aa76b71..1988a71 100755 --- a/email/aiaiai-email-test-patchset +++ b/email/aiaiai-email-test-patchset @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*}/..)" -PATH="$srcdir:$srcdir/email:$srcdir/helpers/libshell:$PATH" +PATH="$srcdir:$srcdir/helpers:$srcdir/email:$srcdir/helpers/libshell:$PATH" . shell-error . shell-args diff --git a/gerrit/aiaiai-jenkins-test-patchset b/gerrit/aiaiai-jenkins-test-patchset index 326268b..86294fc 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/helpers/libshell:$PATH" . shell-error . shell-args diff --git a/helpers/Makefile b/helpers/Makefile index cbc9493..4a06f73 100644 --- a/helpers/Makefile +++ b/helpers/Makefile @@ -1,7 +1,6 @@ -CFLAGS = -O2 -g -Wextra - all: $(CC) $(CFLAGS) -o remap-log remap-log.c + $(CC) $(CFLAGS) -o aiaiai-locker aiaiai-locker.c clean: - $(RM) remap-log + $(RM) remap-log aiaiai-locker diff --git a/aiaiai-checker b/helpers/aiaiai-checker similarity index 98% rename from aiaiai-checker rename to helpers/aiaiai-checker index 1c68efc..0487670 100755 --- a/aiaiai-checker +++ b/helpers/aiaiai-checker @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*})" -PATH="$srcdir:$srcdir/helpers/libshell:$srcdir/helpers:$PATH" +PATH="$srcdir:$srcdir/libshell:$PATH" . shell-error . shell-args diff --git a/aiaiai-decode-rfc-2047 b/helpers/aiaiai-decode-rfc-2047 similarity index 100% rename from aiaiai-decode-rfc-2047 rename to helpers/aiaiai-decode-rfc-2047 diff --git a/aiaiai-diff-log b/helpers/aiaiai-diff-log similarity index 98% rename from aiaiai-diff-log rename to helpers/aiaiai-diff-log index 54228d9..e053edc 100755 --- a/aiaiai-diff-log +++ b/helpers/aiaiai-diff-log @@ -6,7 +6,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*})" -PATH="$srcdir:$srcdir/helpers/libshell:$srcdir/helpers:$PATH" +PATH="$srcdir:$srcdir/libshell:$PATH" . shell-error . shell-args diff --git a/aiaiai-diff-log-helper b/helpers/aiaiai-diff-log-helper similarity index 100% rename from aiaiai-diff-log-helper rename to helpers/aiaiai-diff-log-helper diff --git a/aiaiai-locker.c b/helpers/aiaiai-locker.c similarity index 100% rename from aiaiai-locker.c rename to helpers/aiaiai-locker.c diff --git a/aiaiai-make-kernel b/helpers/aiaiai-make-kernel similarity index 99% rename from aiaiai-make-kernel rename to helpers/aiaiai-make-kernel index 3bb2f02..7153629 100755 --- a/aiaiai-make-kernel +++ b/helpers/aiaiai-make-kernel @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*})" -export PATH="$srcdir:$srcdir/helpers/libshell:$srcdir/helpers:$PATH" +export PATH="$srcdir:$srcdir/libshell:$PATH" . shell-error . shell-args diff --git a/aiaiai-match-keywords b/helpers/aiaiai-match-keywords similarity index 97% rename from aiaiai-match-keywords rename to helpers/aiaiai-match-keywords index bab7902..f316792 100755 --- a/aiaiai-match-keywords +++ b/helpers/aiaiai-match-keywords @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*})" -PATH="$srcdir:$srcdir/helpers/libshell:$PATH" +PATH="$srcdir:$srcdir/libshell:$PATH" . shell-error . shell-args diff --git a/aiaiai-sh-functions b/helpers/aiaiai-sh-functions similarity index 100% rename from aiaiai-sh-functions rename to helpers/aiaiai-sh-functions diff --git a/aiaiai-test-bisectability b/helpers/aiaiai-test-bisectability similarity index 99% rename from aiaiai-test-bisectability rename to helpers/aiaiai-test-bisectability index ffc0f55..913c0a6 100755 --- a/aiaiai-test-bisectability +++ b/helpers/aiaiai-test-bisectability @@ -5,7 +5,7 @@ # License: GPLv2 srcdir="$(readlink -ev -- ${0%/*})" -PATH="$srcdir:$srcdir/helpers/libshell:$srcdir/helpers:$PATH" +PATH="$srcdir:$srcdir/libshell:$PATH" . shell-error . shell-args -- 2.50.1