未古其人

目录

个人项目安装脚本

#!/bin/bash

####################
# 个人项目安装脚本 #
####################

git clone https://github.com/undeadway/proton.git
git clone -b v0.0.1 https://github.com/undeadway/jsql.git

if [ $1 == "" ]
then
	echo "It must has a parameter for database name."
fi

cd nodejs
npm install

cd ..
mkdir db
cd db
rm -rf $1

cd ../install

node install $1
cd ..

cd nodejs/node_modules

moNames=("proton" "jsql")

for moName in ${moNames[@]}
do
    rm -rf $moName
    mv ../../$moName ./
    cd $moName
    rm -rf .git
    cd ..
done

if [[ $2 == "" ]]
then
    rm -rf install/
    rm -rf install.sh
fi