代码拉取完成,页面将自动刷新
同步操作将从 三字经/facil.io 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#! /bin/bash
# This script is Benjamín C. Calderón's brain child (@benjcal).
# Written by Bo and a "good enough for now" draft.
#
# This script isn't safe to update between releases. The new_post_download script should be edited instead.
if [ -z $1 ]
then
echo "Please name the application (the folder to create):"
read FIO_APPNAME
else
FIO_APPNAME=$1
fi
if [ -a $FIO_APPNAME ]; then echo "Couldn't create folder, already exists?"; exit 1; fi
if [ -d $FIO_APPNAME ]; then echo "Couldn't create folder, already exists?"; exit 1; fi
if [[ ! -z "${FIO_BRANCH}" ]]; then
FIO_URL=https://github.com/boazsegev/facil.io/archive/${FIO_BRANCH}.tar.gz
elif [[ ! -z "${FIO_RELEASE}" ]]; then
FIO_URL=$(curl -s https://api.github.com/repos/boazsegev/facil.io/releases/tags/${FIO_RELEASE} | grep tarball_url | cut -d '"' -f 4)
else
FIO_URL=$(curl -s https://api.github.com/repos/boazsegev/facil.io/releases/latest | grep tarball_url | cut -d '"' -f 4)
fi
if [[ -z "${FIO_URL}" ]]; then echo "URL error, FIO_BRANCH or FIO_RELEASE don't exist?"; exit 1; fi
echo "* Creating $FIO_APPNAME"
mkdir $FIO_APPNAME
cd $FIO_APPNAME
echo "* Downloading from $FIO_URL"
# Was: curl -s -LJO https://github.com/boazsegev/facil.io/archive/stable.tar.gz
# But it's better to use releases than the stable branch:
curl -s -o facil.io.tar.gz -LJO $FIO_URL
if [ $? -ne 0 ]; then echo "Couldn't download the latest release from facil.io's GitHub repo."; exit 1; fi
tar --strip-components=1 -xzf facil.io.tar.gz
if [ $? -ne 0 ]; then echo "Couldn't extract tar."; exit 1; fi
rm facil.io.tar.gz
echo "* Cleaning up and placing example code."
./scripts/new/cleanup
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。