scripts: fix run in any directory
authorThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 14 Mar 2016 20:55:13 +0000 (21:55 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 7 Apr 2016 21:05:47 +0000 (23:05 +0200)
The path to load-devel-config.sh must be relative to the script.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
scripts/checkpatches.sh
scripts/test-build.sh

index fcb24fd..5c58a20 100755 (executable)
@@ -33,7 +33,7 @@
 # Load config options:
 # - DPDK_CHECKPATCH_PATH
 # - DPDK_CHECKPATCH_LINE_LENGTH
-. scripts/load-devel-config.sh
+. $(dirname $(readlink -e $0))/load-devel-config.sh
 
 length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
 
index 5f3cab5..be8275e 100755 (executable)
@@ -38,7 +38,7 @@
 # - DPDK_DEP_MOFED (y/[n])
 # - DPDK_DEP_PCAP (y/[n])
 # - DPDK_NOTIFY (notify-send)
-. scripts/load-devel-config.sh
+. $(dirname $(readlink -e $0))/load-devel-config.sh
 
 print_usage () {
        echo "usage: $(basename $0) [-h] [-jX] [-s] [config1 [config2] ...]]"