Merge pull request #670 from yyuu/conda-rehash-config

Split blacklist of conda's system executables
This commit is contained in:
Yamashita, Yuu 2016-08-15 15:00:07 +09:00 committed by GitHub
commit 949c1dab8d
2 changed files with 85 additions and 41 deletions

View file

@ -11,47 +11,13 @@ conda_exists() {
[ -n "${condas}" ] [ -n "${condas}" ]
} }
conda_shim() { shims=()
case "${1##*/}" in for shim in $(cat "${BASH_SOURCE%/*}/conda.txt"); do
"curl" | "curl-config" ) if [ -n "${shim%%#*}" ]; then
return 0 # curl shims[${#shims[*]}]="${shim})return 0;;"
;; fi
"fc-cache" | "fc-cat" | "fc-list" | "fc-match" | "fc-pattern" | "fc-query" | "fc-scan" | "fc-validate" ) done
return 0 # fontconfig eval "conda_shim(){ case \"\$1\" in ${shims[@]} *)return 1;;esac;}"
;;
"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
}
# 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

78
pyenv.d/rehash/conda.txt Normal file
View file

@ -0,0 +1,78 @@
# curl
curl
curl-config
# fontconfig
fc-cache
fc-cat
fc-list
fc-match
fc-pattern
fc-query
fc-scan
fc-validate
# freetype
freetype-config
# libglib2.0-bin
gapplication
gdbus
gresource
gsettings
gio-querymodules
glib-compile-resources
glib-compile-schemas
# libpng
libpng-config
# libxml2
xml2-config
# libxml2-utils
xmlcatalog
xmllint
# openssl
openssl
# qtchooser
assistant
designer
lconvert
linguist
lrelease
lupdate
moc
pixeltool
qcollectiongenerator
qdbus
qdbuscpp2xml
qdbusviewer
qdbusxml2cpp
qhelpconverter
qhelpgenerator
qmake
qmlplugindump
qmlviewer
qtconfig
rcc
uic
xmlpatterns
xmlpatternsvalidator
# redis
redis-benchmark
redis-check-aof
redis-check-dump
redis-cli
redis-server
# sqlite3
sqlite3
# xslt-config
xslt-config
# xsltproc
xsltproc
# xz
unxz
xz
xzcat
xzcmd
xzdiff
xzegrep
xzfgrep
xzgrep
xzless
xzmore