1 Star 1 Fork 44

ahxhsoft2 / facil.io

forked from 三字经 / facil.io 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
app 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
Bo 提交于 2018-11-12 21:00 . pre-release (0.7.0-beta1) housekeeping
#! /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
C
1
https://gitee.com/hwdc1987/facil.io.git
git@gitee.com:hwdc1987/facil.io.git
hwdc1987
facil.io
facil.io
master

搜索帮助