修改安装运行脚本

Signed-off-by: deveco_test <liguangjie1@huawei.com>
This commit is contained in:
deveco_test 2022-08-16 13:05:51 +08:00
parent 0ec20a4630
commit 0ab97659c8
2 changed files with 9 additions and 2 deletions

View File

@ -37,6 +37,12 @@ python -c "import pip"
goto:eof
)
python -c "import easy_install"
@if errorlevel 1 (
@echo "Please install setuptools first!"
goto:eof
)
if not exist %TOOLS% (
@echo "no %TOOLS% directory exist"
goto:eof
@ -47,7 +53,7 @@ python -m pip uninstall -y xdevice-extension
python -m pip uninstall -y xdevice-ohos
for %%a in (%TOOLS%/*.egg) do (
python -m pip install --user %TOOLS%/%%a
python -m easy_install --user %TOOLS%/%%a
@if errorlevel 1 (
@echo "Error occurs to install %%a!"
)

3
run.sh
View File

@ -33,6 +33,7 @@ $PYTHON -c 'import sys; exit(1) if sys.version_info.major < 3 or sys.version_inf
error "Python3.7 or higher version required!"
cd $(dirname "$0") || error "Failure to change direcory!"
$PYTHON -c "import pip" || error "Please install pip first!"
$PYTHON -c "import easy_install" || error "Please install setuptools first!"
if [ ! -d $TOOLS ]; then
error "$TOOLS directory not exists"
@ -47,7 +48,7 @@ do
if [ ! -e "$f" ]; then
error "Can not find xdevice package!"
fi
$PYTHON -m pip install --user "$f" || echo "Error occurs to install $f!"
$PYTHON -m easy_install --user "$f" || echo "Error occurs to install $f!"
done
for f in "$TOOLS"/*.tar.gz