summaryrefslogtreecommitdiff
path: root/init-tools.sh
diff options
context:
space:
mode:
authorGeunsik Lim <geunsik.lim@samsung.com>2016-03-22 14:00:19 +0900
committerGeunsik Lim <geunsik.lim@samsung.com>2016-03-22 19:47:04 +0900
commit0949aa73e7ee0a57e079317478ae2ad1ed94a27f (patch)
treeb9228f3e12f654472c3c4c535a9ec89ac8062449 /init-tools.sh
parent54e298abc6d73dc80a9243ef091ac324e7665ff9 (diff)
downloadcoreclr-0949aa73e7ee0a57e079317478ae2ad1ed94a27f.tar.gz
coreclr-0949aa73e7ee0a57e079317478ae2ad1ed94a27f.tar.bz2
coreclr-0949aa73e7ee0a57e079317478ae2ad1ed94a27f.zip
Don't use symbolic link 'sh'(/bin/sh) in ./coreclr/init-tools.sh
There are a lot of different shells among the Linux distributions. The up-to-date Ubuntu distribution uses /bin/dash without /bin/bash by default. Also, the /bin/sh command has been using as a symbolic link without the original /bin/sh in the some popular Linux distributions such as Ubuntu 14.04. Ver 3: - Don't use 'sh' command thanks to the "#!/usr/bin/env bash" (first line) - /bin/sh of Ubuntu 14.04 is symbolic link. It calls /bin/dash by default. Ver 1: - Let's replace a symbolic 'sh' with 'bash' such as "#!/usr/bin/env bash" declaration (shebang) of ./coreclr/init-tools.sh lgs@u14.04:~$ ls -l `which sh` lrwxrwxrwx 1 root root 4 12 21 17:01 /bin/sh -> dash lgs@u14.04:~$ Signed-off-by: Geunsik Lim geunsik.lim@samsung.com Signed-off-by: MyungJoo Ham myungjoo.ham@samsung.com Signed-off-by: Prajwal A N an.prajwal@samsung.com
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/init-tools.sh b/init-tools.sh
index f57991e6e4..f7d1aa8847 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -107,6 +107,8 @@ if [ ! -e $__PROJECT_JSON_FILE ]; then
$__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE
fi
- sh $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR
+ # On ubuntu 14.04, /bin/sh (symbolic link) calls /bin/dash by default.
+ $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR
+
chmod a+x $__TOOLRUNTIME_DIR/corerun
fi