From 3c4cd15318ec157a368de01b0f8cec06cfb4d15f Mon Sep 17 00:00:00 2001 From: Simon Hartcher Date: Sat, 9 May 2015 17:14:00 +1000 Subject: [PATCH] Add ~/.profile support to busybox bash bash shim now loads ~/.profile on startup which sources ~/.bashrc if it exists --- busybox.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/busybox.json b/busybox.json index 3426e856c6..1c7654921f 100644 --- a/busybox.json +++ b/busybox.json @@ -11,7 +11,7 @@ [ "busybox.exe", "awk", "awk" ], [ "busybox.exe", "base64", "base64" ], [ "busybox.exe", "basename", "basename" ], - [ "busybox.exe", "bash", "bash" ], + [ "busybox.exe", "bash", "bash", "-l" ], [ "busybox.exe", "bbconfig", "bbconfig" ], [ "busybox.exe", "bunzip2", "bunzip2" ], [ "busybox.exe", "bzcat", "bzcat" ], @@ -119,5 +119,16 @@ [ "busybox.exe", "xzcat", "xzcat" ], [ "busybox.exe", "yes", "yes" ], [ "busybox.exe", "zcat", "zcat" ] - ] + ], + "post_install": " + if(!(test-path ~/.profile)) { + 'creating ~/.profile' +@\" +if [ -e ~/.bashrc ] +then + source ~/.bashrc +fi +\"@ | out-file -en oem ~/.profile + } + " }