修改shell语法

This commit is contained in:
whyour
2021-11-05 23:39:22 +08:00
parent 2b70851074
commit 65ade4b996
7 changed files with 31 additions and 31 deletions
+2 -8
View File
@@ -125,7 +125,7 @@ link_shell() {
define_cmd() {
local cmd_prefix cmd_suffix
if type task >/dev/null 2>&1; then
if type task &>/dev/null; then
cmd_suffix=""
if [[ -x "$dir_shell/task.sh" ]]; then
cmd_prefix=""
@@ -213,7 +213,7 @@ fix_config() {
npm_install_sub() {
if [[ $is_termux -eq 1 ]]; then
npm install --production --no-save --no-bin-links --registry=https://registry.npm.taobao.org || npm install --production --no-bin-links --no-save
elif ! type pnpm >/dev/null 2>&1; then
elif ! type pnpm &>/dev/null; then
npm install --production --no-save --registry=https://registry.npm.taobao.org || npm install --production --no-save
else
pnpm install --prod
@@ -261,12 +261,6 @@ update_depend() {
npm_install_2 $dir_scripts
fi
if [[ ! -s $dir_scripts/requirements.txt ]] || [[ $(diff $dir_sample/requirements.txt $dir_scripts/requirements.txt) ]]; then
cp -f $dir_sample/requirements.txt $dir_scripts/requirements.txt
cd $dir_scripts
pip3 install -r $dir_scripts/requirements.txt
fi
cd $dir_current
}