website/install.sh

24 lines
706 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# nuxt-pro 1.1.0
FIND_FILE="./package.json"
FIND_STR="@nuxt/ui-pro"
# 判断匹配函数匹配函数不为0则包含给定字符
if [ `grep -c "$FIND_STR" $FIND_FILE` -ne '0' ];then
echo "找到UI-PRO开始删除"
# sed -n '/build:before/=' ./node_modules/@nuxt/ui-pro/modules/pro/index.ts
FIND_FILE="./node_modules/@nuxt/ui-pro/modules/pro/index.ts"
FIND_STR="build:before"
# 判断匹配函数匹配函数不为0则包含给定字符
if [ `grep -c "$FIND_STR" $FIND_FILE` -ne '0' ];then
echo "找到build:before开始删除"
sed -i '103,105d' ./node_modules/@nuxt/ui-pro/modules/pro/index.ts
exit 0
fi
exit 0
fi