Commit ff04e2d4 authored by rlgy's avatar rlgy

update

parent 430a6e29
cp api/index-dev.php api/index.php #! /bin/bash
cp api/config/main.php api/config/main-local.php
cp api/config/params.php api/config/params-local.php # file needed copy
cp backend/index-dev.php backend/index.php exists_file=(
cp backend/config/main.php backend/config/main-local.php "api/index-dev.php"
cp backend/config/params.php backend/config/params-local.php "api/config/main.php"
cp common/config/main.php common/config/main-local.php "api/config/params.php"
cp common/config/params.php common/config/params-local.php "backend/index-dev.php"
cp console/config/main.php console/config/main-local.php "backend/config/main.php"
cp console/config/params.php console/config/params-local.php "backend/config/params.php"
cp h5/index-dev.php h5/index.php "common/config/main.php"
cp h5/config/main.php h5/config/main-local.php "common/config/params.php"
cp h5/config/params.php h5/config/params-local.php "console/config/main.php"
cp yii-local yii "console/config/params.php"
chmod 777 backend/assets/ -R "h5/index-dev.php"
chmod 777 backend/runtime/ -R "h5/config/main.php"
chmod 777 api/runtime/ -R "h5/config/params.php"
chmod 777 h5/runtime/ -R "yii-local"
chmod 777 console/runtime/ -R )
# tag file
tag_file=(
"api/index.php"
"api/config/main-local.php"
"api/config/params-local.php"
"backend/index.php"
"backend/config/main-local.php"
"backend/config/params-local.php"
"common/config/main-local.php"
"common/config/params-local.php"
"console/config/main-local.php"
"console/config/params-local.php"
"h5/index.php"
"h5/config/main-local.php"
"h5/config/params-local.php"
"yii"
)
# copy file if no exists
for (( i = 0; i < ${#tag_file[*]}; i++ )); do
if [[ ! -f ${tag_file[$i]} ]]; then
echo "copy file ${exists_file[i]} to ${tag_file[i]}"
cp ${exists_file[i]} ${tag_file[i]}
fi
done
# chmod directory to 777
directory=(
"backend/assets"
"backend/runtime"
"api/runtime"
"h5/runtime"
"console/runtime"
)
for (( i = 0; i < ${#directory[*]}; i++ )); do
chmod 777 ${directory[i]} -R
done
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment