代码拉取完成,页面将自动刷新
同步操作将从 EdgeGallery/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
# Env setup for local build
# Common function for exit function
exit_if_error() {
local exit_code=$1
shift
[[ $exit_code ]] &&
((exit_code != 0)) && {
printf 'ERROR: %s\n' "$@" >&2
}
}
# Common clean up function
cleanup() {
rm -rf ~/docs_jjb
}
# Cleanup signal on every exit
trap cleanup EXIT
# Initial cleanup
cleanup
unfilteredver="(python3 -V)"
# Getting the environment's running python3 version
currentver="$(sed 's/[[:alpha:][:space:]]//g' <<< "$unfilteredver")"
requiredver="3.7.9"
# Condition to exit script on lower versions, and continue on equal or higher versions of python3.7.9
if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then
echo "Existing python version is greater than or equal to ${requiredver}"
else
echo "Existing python version is less than ${requiredver}"
exit 1
fi
# Getting the environment's running virtualenv version
curvirtualenvver="$(virtualenv --version)"
novirtualenvver="0.0.0"
# Condition to check if virtualenv is installed, if not, to install latest version of it
if [ "$(printf '%s\n' "$novirtualenvver" "$curvirtualenvver" | sort -V | head -n1)" = "$novirtualenvver" ]; then
echo "python-virtualenv is installed"
else
echo "python-virtualenv installation begins"
sudo apt-get update
sudo apt-get install python-virtualenv -y
exit_if_error $? "Unable to install python-virtualenv."
fi
lighttpd -v
if [ $? -eq 0 ]; then
echo "lighttpd INSTALLED"
else
echo "lighttpd IS NOT INSTALLED, IT WILL BE INSTALLED NOW"
sudo apt install lighttpd -y
sudo systemctl start lighttpd
sudo systemctl enable lighttpd
sudo systemctl status lighttpd
#verify lighttpd
cm=$(lighttpd -v)
echo -e "$cm"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。