From 66309adaa166362d4294b103a84badf9b6e1fb40 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 10 Jun 2022 16:11:35 +0800 Subject: [PATCH] up --- scripts/install/ubuntu.sh | 7 +++++++ scripts/update.sh | 14 ++++++-------- scripts/update/macos.sh | 7 +++++++ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 scripts/update/macos.sh diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 0f5c14306..16654c153 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -3,4 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 + +mkdir -p /www/server +mkdir -p /www/wwwroot +mkdir -p /www/wwwlogs +mkdir -p /www/backup/database +mkdir -p /www/backup/site + echo "ubuntu dev ..." \ No newline at end of file diff --git a/scripts/update.sh b/scripts/update.sh index 87906c4a0..ef0081938 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -24,7 +24,11 @@ elif grep -Eqi "Amazon Linux AMI" /etc/issue || grep -Eq "Amazon Linux AMI" /etc elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + OSNAME='ubuntu' + sudo ln -sf /bin/bash /bin/sh + # sudo dpkg-reconfigure dash + elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then OSNAME='raspbian' elif grep -Eqi "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then @@ -35,14 +39,8 @@ fi #pip uninstall public echo "use system version: ${OSNAME}" - -if [ "$OSNAME" == 'macos' ]; then - echo 'The development environment only needs to be downloaded again!' - exit 0 -else - curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/update/${OSNAME}.sh | sh -fi +curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/update/${OSNAME}.sh | sh endTime=`date +%s` -outTime=($endTime-$startTime)/60 +((outTime=($endTime-$startTime)/60)) echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" \ No newline at end of file diff --git a/scripts/update/macos.sh b/scripts/update/macos.sh new file mode 100644 index 000000000..fbf382aba --- /dev/null +++ b/scripts/update/macos.sh @@ -0,0 +1,7 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + +echo 'The development environment only needs to be downloaded again!' +exit 0 \ No newline at end of file