mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
dev
This commit is contained in:
parent
c90a0ce579
commit
1dc07713da
|
@ -171,17 +171,19 @@ diff_and_copy () {
|
||||||
local copy_source=$1
|
local copy_source=$1
|
||||||
local copy_to=$2
|
local copy_to=$2
|
||||||
if [ ! -s $copy_to ] || [[ $(diff $copy_source $copy_to) ]]; then
|
if [ ! -s $copy_to ] || [[ $(diff $copy_source $copy_to) ]]; then
|
||||||
cp $copy_source $copy_to
|
cp -f $copy_source $copy_to
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
## 更新依赖
|
## 更新依赖
|
||||||
update_depend () {
|
update_depend () {
|
||||||
diff_and_copy "$dir_sample/package.json" "$dir_scripts/package.json"
|
|
||||||
if [ ! -s $dir_scripts/package.json ] || [[ $(diff $dir_sample/package.json $dir_scripts/package.json) ]]; then
|
if [ ! -s $dir_scripts/package.json ] || [[ $(diff $dir_sample/package.json $dir_scripts/package.json) ]]; then
|
||||||
|
cp -f $dir_sample/package.json $dir_scripts/package.json
|
||||||
npm_install_2 $dir_scripts
|
npm_install_2 $dir_scripts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ ! -d $dir_scripts/node_modules ] && npm_install_2 $dir_scripts
|
||||||
|
|
||||||
diff_and_copy "$dir_sample/sendNotify.js" "$dir_scripts/sendNotify.js"
|
diff_and_copy "$dir_sample/sendNotify.js" "$dir_scripts/sendNotify.js"
|
||||||
diff_and_copy "$dir_sample/jdCookie.js" "$dir_scripts/jdCookie.js"
|
diff_and_copy "$dir_sample/jdCookie.js" "$dir_scripts/jdCookie.js"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user