[git commit master] ash, hush: make "source" a synonym for . if bash compat is on

Denys Vlasenko vda.linux at googlemail.com
Mon May 17 15:49:52 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=82731b4b7a5634bdee52d98b1a7686e18a861ebc
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/ash.c  |    2 ++
 shell/hush.c |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/shell/ash.c b/shell/ash.c
index ef5b2d4..ea813e0 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -8944,7 +8944,9 @@ static const struct builtincmd builtintab[] = {
 	{ BUILTIN_SPEC_REG      "return"  , returncmd  },
 	{ BUILTIN_SPEC_REG      "set"     , setcmd     },
 	{ BUILTIN_SPEC_REG      "shift"   , shiftcmd   },
+#if ENABLE_ASH_BASH_COMPAT
 	{ BUILTIN_SPEC_REG      "source"  , dotcmd     },
+#endif
 #if ENABLE_ASH_BUILTIN_TEST
 	{ BUILTIN_REGULAR       "test"    , testcmd    },
 #endif
diff --git a/shell/hush.c b/shell/hush.c
index 1bc0c61..a88fa05 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -673,6 +673,9 @@ static const struct built_in_command bltins1[] = {
 #endif
 	BLTIN("set"      , builtin_set     , "Set/unset positional parameters"),
 	BLTIN("shift"    , builtin_shift   , "Shift positional parameters"),
+#if ENABLE_HUSH_BASH_COMPAT
+	BLTIN("source"   , builtin_source  , "Run commands in a file"),
+#endif
 	BLTIN("trap"     , builtin_trap    , "Trap signals"),
 	BLTIN("type"     , builtin_type    , "Show command type"),
 	BLTIN("ulimit"   , shell_builtin_ulimit  , "Control resource limits"),
-- 
1.6.3.3



More information about the busybox-cvs mailing list