|
|
@ -11,47 +11,13 @@ conda_exists() { |
|
|
[ -n "${condas}" ] |
|
|
[ -n "${condas}" ] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
conda_shim() { |
|
|
|
|
|
case "${1##*/}" in |
|
|
|
|
|
"curl" | "curl-config" ) |
|
|
|
|
|
return 0 # curl |
|
|
|
|
|
;; |
|
|
|
|
|
"fc-cache" | "fc-cat" | "fc-list" | "fc-match" | "fc-pattern" | "fc-query" | "fc-scan" | "fc-validate" ) |
|
|
|
|
|
return 0 # fontconfig |
|
|
|
|
|
;; |
|
|
|
|
|
"freetype-config" ) |
|
|
|
|
|
return 0 # freetype |
|
|
|
|
|
;; |
|
|
|
|
|
"libpng-config" ) |
|
|
|
|
|
return 0 # libpng |
|
|
|
|
|
;; |
|
|
|
|
|
"openssl" ) |
|
|
|
|
|
return 0 # openssl |
|
|
|
|
|
;; |
|
|
|
|
|
"assistant" | "designer" | "lconvert" | "linguist" | "lrelease" | "lupdate" | "moc" | "pixeltool" | "qcollectiongenerator" | "qdbus" | "qdbuscpp2xml" | "qdbusviewer" | "qdbusxml2cpp" | "qhelpconverter" | "qhelpgenerator" | "qmake" | "qmlplugindump" | "qmlviewer" | "qtconfig" | "rcc" | "uic" | "xmlpatterns" | "xmlpatternsvalidator" ) |
|
|
|
|
|
return 0 # qtchooser |
|
|
|
|
|
;; |
|
|
|
|
|
"redis-benchmark" | "redis-check-aof" | "redis-check-dump" | "redis-cli" | "redis-server" ) |
|
|
|
|
|
return 0 # redis |
|
|
|
|
|
;; |
|
|
|
|
|
"sqlite3" ) |
|
|
|
|
|
return 0 # sqlite3 |
|
|
|
|
|
;; |
|
|
|
|
|
"xml2-config" ) |
|
|
|
|
|
return 0 # libxml2 |
|
|
|
|
|
;; |
|
|
|
|
|
"xslt-config" ) |
|
|
|
|
|
return 0 # libxslt |
|
|
|
|
|
;; |
|
|
|
|
|
"xsltproc" ) |
|
|
|
|
|
return 0 # xsltproc |
|
|
|
|
|
;; |
|
|
|
|
|
"unxz" | "xz" | "xzcat" | "xzcmd" | "xzdiff" | "xzegrep" | "xzfgrep" | "xzgrep" | "xzless" | "xzmore" ) |
|
|
|
|
|
return 0 # xz-utils |
|
|
|
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
return 1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
shims=() |
|
|
|
|
|
for shim in $(cat "${BASH_SOURCE%/*}/conda.txt"); do |
|
|
|
|
|
if [ -n "${shim%%#*}" ]; then |
|
|
|
|
|
shims[${#shims[*]}]="${shim})return 0;;" |
|
|
|
|
|
fi |
|
|
|
|
|
done |
|
|
|
|
|
eval "conda_shim(){ case \"\$1\" in ${shims[@]} *)return 1;;esac;}" |
|
|
|
|
|
|
|
|
# override `make_shims` to avoid conflict between pyenv-virtualenv's `envs.bash` |
|
|
# override `make_shims` to avoid conflict between pyenv-virtualenv's `envs.bash` |
|
|
# https://github.com/yyuu/pyenv-virtualenv/blob/v20160716/etc/pyenv.d/rehash/envs.bash |
|
|
# https://github.com/yyuu/pyenv-virtualenv/blob/v20160716/etc/pyenv.d/rehash/envs.bash |
|
|
|