[dpdk-dev,v2] scripts: make load-devel-config not to appear as executable
Commit Message
*Updates in v2*
- drop the #!/bin/echo now that it is no more executable
Quoting the first line of the script: "#! /bin/echo must be loaded with ."
Given that we should drop the .sh file ending as well as the executable
flag - both are not needed to source the file.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
MAINTAINERS | 2 +-
scripts/checkpatches.sh | 2 +-
scripts/load-devel-config | 12 ++++++++++++
scripts/load-devel-config.sh | 14 --------------
scripts/test-build.sh | 4 ++--
5 files changed, 16 insertions(+), 18 deletions(-)
create mode 100644 scripts/load-devel-config
delete mode 100755 scripts/load-devel-config.sh
Comments
2016-08-03 16:59, Christian Ehrhardt:
> *Updates in v2*
> - drop the #!/bin/echo now that it is no more executable
>
> Quoting the first line of the script: "#! /bin/echo must be loaded with ."
> Given that we should drop the .sh file ending as well as the executable
> flag - both are not needed to source the file.
>
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Applied, thanks (despite I disagree with this change ;)
@@ -27,7 +27,7 @@ F: MAINTAINERS
F: scripts/check-maintainers.sh
F: scripts/check-git-log.sh
F: scripts/checkpatches.sh
-F: scripts/load-devel-config.sh
+F: scripts/load-devel-config
F: scripts/test-build.sh
Stable Branches
@@ -33,7 +33,7 @@
# Load config options:
# - DPDK_CHECKPATCH_PATH
# - DPDK_CHECKPATCH_LINE_LENGTH
-. $(dirname $(readlink -e $0))/load-devel-config.sh
+. $(dirname $(readlink -e $0))/load-devel-config
length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
new file mode 100644
@@ -0,0 +1,12 @@
+# Load DPDK devel config and allow override
+# from system file
+test ! -r /etc/dpdk/devel.config ||
+ . /etc/dpdk/devel.config
+# from user file
+test ! -r ~/.config/dpdk/devel.config ||
+ . ~/.config/dpdk/devel.config
+# from local file
+test ! -r $(dirname $(readlink -m $0))/../.develconfig ||
+ . $(dirname $(readlink -m $0))/../.develconfig
+
+# The config files must export variables in the shell style
deleted file mode 100755
@@ -1,14 +0,0 @@
-#! /bin/echo must be loaded with .
-
-# Load DPDK devel config and allow override
-# from system file
-test ! -r /etc/dpdk/devel.config ||
- . /etc/dpdk/devel.config
-# from user file
-test ! -r ~/.config/dpdk/devel.config ||
- . ~/.config/dpdk/devel.config
-# from local file
-test ! -r $(dirname $(readlink -m $0))/../.develconfig ||
- . $(dirname $(readlink -m $0))/../.develconfig
-
-# The config files must export variables in the shell style
@@ -48,7 +48,7 @@ default_path=$PATH
# - DPDK_NOTIFY (notify-send)
# - LIBSSO_SNOW3G_PATH
# - LIBSSO_KASUMI_PATH
-. $(dirname $(readlink -e $0))/load-devel-config.sh
+. $(dirname $(readlink -e $0))/load-devel-config
print_usage () {
echo "usage: $(basename $0) [-h] [-jX] [-s] [config1 [config2] ...]]"
@@ -211,7 +211,7 @@ for conf in $configs ; do
# reload config with DPDK_TARGET set
DPDK_TARGET=$target
reset_env
- . $(dirname $(readlink -e $0))/load-devel-config.sh
+ . $(dirname $(readlink -e $0))/load-devel-config
options=$(echo $conf | sed 's,[^~+]*,,')
dir=$conf