Skip to content

Commit

Permalink
up: update the install script and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jun 25, 2022
1 parent d142c8a commit 03121e8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Kite is a tool for help development.

### Install by script

> file: [bin/install.sh](bin/install.sh)
> file: [deploy/install.sh](deploy/install.sh)
```bash
curl https://github.com/inhere/kite/master/bin/install.sh | bash
curl https://github.com/inhere/kite/master/deploy/install.sh | bash
```

### Manual clone
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ PHP编写的,方便本地开发和使用的个人CLI工具应用。
**脚本安装(推荐)**

> file: [bin/install.sh](bin/install.sh)
> file: [deploy/install.sh](deploy/install.sh)
```bash
curl https://github.com/inhere/kite/master/bin/install.sh | bash
curl https://github.com/inhere/kite/master/deploy/install.sh | bash
```

**手动安装**
Expand Down
21 changes: 19 additions & 2 deletions bin/install.sh → deploy/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This is an script for install inhere/kite
# More please see https://github.com/inhere/kite
#
# local run: bash ./deploy/install.sh
set -e

INSTALL_DIR=~
Expand All @@ -11,12 +12,28 @@ CLONE_DIR=.kite
# goto user home dir.
cd $INSTALL_DIR || exit

echo "🔄 Check install depends: git, php, composer"
if ! [ -x "$(command -v git)" ]; then
echo '🔴 Error: git is not installed.'
exit 1
fi

if ! [ -x "$(command -v php5)" ]; then
echo '🔴 Error: php is not installed.'
exit 1
fi

if ! [ -x "$(command -v composer)" ]; then
echo '🔴 Error: composer is not installed.'
exit 1
fi

if [ -d "$INSTALL_DIR/$CLONE_DIR"/bin ]; then
echo "- 🙈 SKIP install, the kite dir exists"
echo "🙈 SKIP install, the kite dir exists"
exit
fi

echo "🟢 Fetch kite codes by git"
echo "🟢 Fetch kite codes by git clone"
# download tool by git clone
git clone https://github.com/inhere/kite $CLONE_DIR

Expand Down

0 comments on commit 03121e8

Please sign in to comment.