mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fixed typecheck-setup.sh: sudo: command not found on Windows
This commit is contained in:
parent
07a24c0d42
commit
51823bf1ff
2 changed files with 20 additions and 5 deletions
|
@ -14,4 +14,4 @@ case "${unameOut}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
rsync -a "$qtTranslations"/qt* "$out"
|
rsync -a "$qtTranslations/" "$out/"
|
||||||
|
|
|
@ -6,8 +6,23 @@
|
||||||
# able to resolve. A solution that doesn't require modifying the python install
|
# able to resolve. A solution that doesn't require modifying the python install
|
||||||
# would be welcome!
|
# would be welcome!
|
||||||
|
|
||||||
TOOLS="$(cd "`dirname "$0"`"; pwd)"
|
set -eo pipefail
|
||||||
modDir=$(python -c 'import PyQt5, sys, os; print(os.path.dirname(sys.modules["PyQt5"].__file__))')
|
|
||||||
cmd="rsync -a $TOOLS/stubs/PyQt5/* $modDir/"
|
|
||||||
|
|
||||||
$cmd > /dev/null 2>&1 || sudo $cmd
|
TOOLS="$(cd "`dirname "$0"`"; pwd)"
|
||||||
|
modDir=$(python -c 'import PyQt5, sys, os; sys.stdout.write(os.path.dirname(sys.modules["PyQt5"].__file__))')
|
||||||
|
|
||||||
|
unameOut="$(uname -s)"
|
||||||
|
case "${unameOut}" in
|
||||||
|
CYGWIN*)
|
||||||
|
modDir="$(cygpath -u "${modDir}")"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cmd="rsync -a \"${TOOLS}/stubs/PyQt5/\" \"${modDir}/\""
|
||||||
|
|
||||||
|
if [[ "w${OS}" == "wWindows_NT" ]];
|
||||||
|
then
|
||||||
|
eval "${cmd}" > /dev/null 2>&1 || eval "${cmd}"
|
||||||
|
else
|
||||||
|
eval "${cmd}" > /dev/null 2>&1 || eval "${cmd}" || eval "sudo ${cmd}"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue