summaryrefslogtreecommitdiff
path: root/scripts/config
diff options
context:
space:
mode:
authorClement Chauplannaz <chauplac@gmail.com>2013-05-12 23:08:51 +0400
committerYann E. MORIN <yann.morin.1998@free.fr>2013-06-19 01:58:59 +0400
commit7387778510b7deaff866277877c5550c3a14f1fb (patch)
tree6ade8b4df392f68c0099583b73ce6007fc1c5b56 /scripts/config
parent1278ebdbc3167883f32095491990fbdc7cdf8b5e (diff)
downloadlinux-7387778510b7deaff866277877c5550c3a14f1fb.tar.xz
scripts/config: replace hard-coded script name by a dynamic value
The script `config' prints its name in usage() function. It is currently hard-coded to value `config'. However, the script may be reused under a different name in contexts other than the Linux Kernel. Replace the hard-coded value `config' by the name of the script at runtime. Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/config')
-rwxr-xr-xscripts/config12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/config b/scripts/config
index bb4d3deb6d1c..6b3272ef6ec7 100755
--- a/scripts/config
+++ b/scripts/config
@@ -1,6 +1,8 @@
#!/bin/bash
# Manipulate options in a .config file from the command line
+myname=${0##*/}
+
# If no prefix forced, use the default CONFIG_
CONFIG_="${CONFIG_-CONFIG_}"
@@ -8,7 +10,7 @@ usage() {
cat >&2 <<EOL
Manipulate options in a .config file from the command line.
Usage:
-config options command ...
+$myname options command ...
commands:
--enable|-e option Enable option
--disable|-d option Disable option
@@ -33,14 +35,14 @@ options:
--file config-file .config file to change (default .config)
--keep-case|-k Keep next symbols' case (dont' upper-case it)
-config doesn't check the validity of the .config file. This is done at next
+$myname doesn't check the validity of the .config file. This is done at next
make time.
-By default, config will upper-case the given symbol. Use --keep-case to keep
+By default, $myname will upper-case the given symbol. Use --keep-case to keep
the case of all following symbols unchanged.
-config uses 'CONFIG_' as the default symbol prefix. Set the environment
-variable CONFIG_ to the prefix to use. Eg.: CONFIG_="FOO_" config ...
+$myname uses 'CONFIG_' as the default symbol prefix. Set the environment
+variable CONFIG_ to the prefix to use. Eg.: CONFIG_="FOO_" $myname ...
EOL
exit 1
}