代码拉取完成,页面将自动刷新
同步操作将从 LibQQt应用程序开发组织/Multi-environ Technology(PyMake) 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
#main while
while [ 1 ]
do
if [ "$1" = "" ]; then
echo usage:
echo " pylanguage <cmd-name> [ <cmd-params> ... ]"
echo -----
break
fi
export PYEXECNAME=$1
export PYEXECPARAM2=$2
export PYEXECPARAM3=$3
export PYEXECPARAM4=$4
export PYEXECPARAM5=$5
export PYEXECPARAM6=$6
export PYEXECPARAM7=$7
export PYEXECPARAM8=$8
export PYEXECPARAM9=$9
#if has source[.] call , failed. source default work path is user home.
#这些都只是获取到了工作路径
#used for a link to sh
#file=$(readlink -n "$0")
#export PYPROGRAMPATH=${file%/*}
#if [ "${PYPROGRAMPATH}" != "" ]; then
# PYPROGRAMPATH=$PYPROGRAMPATH/..
#else
# #used for a real call to sh
# PYPROGRAMPATH=$(cd `dirname $0`; pwd)/..
#fi
#used for call directory to this sh, include source[.] call.
#export PYPROGRAMPATH=$(cd ..; pwd)
#这个有价值,这个可以获得 source 直接调用的文件名。但是还没有达到目的。source调用的必须找到真的文件。
#DIR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
#echo "dir_path is $DIR_PATH"
#这段代码彻底解决了问题,怎么调用都是对的。= __file__
#在任意目录,
#直接调用 sh 文件
#调用 link
#source 调用 sh 文件
#source 调用 link 文件
#结果都是准确的。
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
#echo .... $DIR
export PYPROGRAMPATH=${DIR}
export PYPROGRAMNAME=pymake.sh
export PYPROGRAMPATHNAME=$PYPROGRAMPATH/$PYPROGRAMNAME
#echo $file
#echo $PYPROGRAMPATH
#echo $(pwd)
##. 获取到的是 -bash
#echo "$0" "$1"
#echo $(filename "$0")
#echo $0 | awk -F'\' '{print $NF}'
#echo starting cmd ...
#export PYEXECINDEX=$(echo $RANDOM)
#echo env index: \[$PYEXECINDEX\]
#export PYMMSOURCEROOT=$("${PYPROGRAMPATHNAME}" source root)
#echo location : \[$PYMMSOURCEROOT\]
#export PYMMSOURCECONFIG=$("$PYPROGRAMPATHNAME" source config)
#echo configure: \[$PYMMSOURCECONFIG\] \[1\]
#export PYMMDEFAULTENVNAME=$("$PYPROGRAMPATHNAME" get current env)
#echo environme: \[$PYMMDEFAULTENVNAME\] \[default\]
#echo $1 $2 $3
#if [ "$3" != "" ]; then
# export PYENVNAME=$3
#else
# export PYENVNAME=$PYMMDEFAULTENVNAME
#fi
export PYENVNAME=current
#echo $PYENVNAME
#export PYEXECFLAG=$("$PYPROGRAMPATHNAME" have env $PYENVNAME)
#if [ "$PYEXECFLAG" = "False" ]; then
# echo environme: \[$PYENVNAME\] is not existed.
# break
#fi
#echo environme: \[$PYENVNAME\] \[$PYEXECFLAG\] \[USED\]
#export PYEXECFLAG=$("$PYPROGRAMPATHNAME" have cmd $PYEXECNAME)
#if [ "$PYEXECFLAG" = "False" ]; then
# echo command\ \ : \[$PYEXECNAME\] is system wild command.
#else
# echo command\ \ : \[$PYEXECNAME\] \[$PYEXECFLAG\] \[EXISTED\]
#fi
#export PYMMSHELLROOT=$("$PYPROGRAMPATHNAME" get default exec root)
#echo exec root: \[$PYMMSHELLROOT\] \[default\]
#echo exec root: \[$(pwd)\] \[here\]
#echo $PYEXECPARAM
#echo $PYEXECPARAM2
#echo $PYEXECPARAM3
#echo $PYEXECPARAM4
#echo $PYEXECPARAM5
#echo $PYEXECPARAM6
#echo $PYEXECPARAM7
#echo $PYEXECPARAM8
#echo $PYEXECPARAM9
#echo "$PYPROGRAMPATHNAME" use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4" --params "$PYEXECPARAM5" --params "$PYEXECPARAM6" --params "$PYEXECPARAM7" --params "$PYEXECPARAM8" --params "$PYEXECPARAM9"
if [ "$PYEXECPARAM9" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4" --params "$PYEXECPARAM5" --params "$PYEXECPARAM6" --params "$PYEXECPARAM7" --params "$PYEXECPARAM8" --params "$PYEXECPARAM9"
elif [ "$PYEXECPARAM8" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4" --params "$PYEXECPARAM5" --params "$PYEXECPARAM6" --params "$PYEXECPARAM7" --params "$PYEXECPARAM8"
elif [ "$PYEXECPARAM7" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4" --params "$PYEXECPARAM5" --params "$PYEXECPARAM6" --params "$PYEXECPARAM7"
elif [ "$PYEXECPARAM6" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4" --params "$PYEXECPARAM5" --params "$PYEXECPARAM6"
elif [ "$PYEXECPARAM5" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4" --params "$PYEXECPARAM5"
elif [ "$PYEXECPARAM4" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3" --params "$PYEXECPARAM4"
elif [ "$PYEXECPARAM3" != "" ]; then
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2" --params "$PYEXECPARAM3"
elif [ "$PYEXECPARAM2" != "" ]; then
#echo .....
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME" --params "$PYEXECPARAM2"
else
"$PYPROGRAMPATHNAME" language use $PYENVNAME exec-with-params here "$PYEXECNAME"
fi
exit $?
break
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。