From 4c40fdfcccd25a3f22acf6516b2b15708bf011db Mon Sep 17 00:00:00 2001 From: evalor Date: Mon, 9 Apr 2018 18:34:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0linux=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC=E5=B9=B6=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E8=84=9A=E6=9C=AC=E8=87=B3bin=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/.htaccess | 2 ++ build.cmd => bin/build.cmd | 0 bin/build.sh | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 bin/.htaccess rename build.cmd => bin/build.cmd (100%) create mode 100644 bin/build.sh diff --git a/bin/.htaccess b/bin/.htaccess new file mode 100644 index 000000000..baa56e5a3 --- /dev/null +++ b/bin/.htaccess @@ -0,0 +1,2 @@ +order allow,deny +deny from all \ No newline at end of file diff --git a/build.cmd b/bin/build.cmd similarity index 100% rename from build.cmd rename to bin/build.cmd diff --git a/bin/build.sh b/bin/build.sh new file mode 100644 index 000000000..53ab9a613 --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +LANG=en_US.UTF-8 + +export PATH + +echo " ++---------------------------------------------------------------------- +| ThinkAdmin environmental preparation tools ++---------------------------------------------------------------------- +| GtiHub : https://github.com/zoujingli/ThinkAdmin ++---------------------------------------------------------------------- +| document : https://www.kancloud.cn/zoujingli/thinkadmin/323614 ++---------------------------------------------------------------------- +" + +hasComposer=`command -v composer` + +echo -e "\033[34mConfirm the existence of the command....\033[0m" + +if [ ! -f "${hasComposer}" ]; then +echo -e "\033[31mComposer Not Found! Initialization cannot continue. \033[0m" +exit +fi + +echo -e "\033[34mClean up the running environment....\033[0m" +rm -rf ./vendor +rm -rf ./thinkphp +rm -rf ./composer.lock + +echo -e "\033[34mComposer install....\033[0m" +composer install --profile --prefer-dist --optimize-autoloader + +echo -e "\033[34mMake Autoload....\033[0m" +composer dump-autoload --optimize + +echo -e "\033[31mEnvironmental preparation success!\033[0m" \ No newline at end of file