From 41d2a8698f80eda75584309bc980e03791fd1bfa Mon Sep 17 00:00:00 2001 From: shinriyo Date: Tue, 3 Nov 2020 11:38:35 +0900 Subject: [PATCH] DRY and add sudo (#687) remove 3 "redundant" text and put one text for DRY. and developers always forget `sudo` and annoying `Need to run with sudo privilege` message. so, add first. --- src/Misc/layoutroot/config.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh index 684745b49..3dad7c76f 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh @@ -18,24 +18,26 @@ then exit 1 fi + message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." + ldd ./bin/libcoreclr.so | grep 'not found' if [ $? -eq 0 ]; then echo "Dependencies is missing for Dotnet Core 3.0" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." + echo $message exit 1 fi ldd ./bin/System.Security.Cryptography.Native.OpenSsl.so | grep 'not found' if [ $? -eq 0 ]; then echo "Dependencies is missing for Dotnet Core 3.0" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." + echo $message exit 1 fi ldd ./bin/System.IO.Compression.Native.so | grep 'not found' if [ $? -eq 0 ]; then echo "Dependencies is missing for Dotnet Core 3.0" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." + echo $message exit 1 fi @@ -53,7 +55,7 @@ then $LDCONFIG_COMMAND -NXv ${libpath//:/ } 2>&1 | grep libicu >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "Libicu's dependencies is missing for Dotnet Core 3.0" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." + echo $message exit 1 fi fi