mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
187978f40a
Summary: The require-ext script tried to test the common extension module names but failed to use the loop variable. This fixes that. Reviewed By: quark-zju Differential Revision: D6803708 fbshipit-source-id: 91a32bc2b63ea9ec0652342424f33c87b0898b70
16 lines
299 B
Bash
Executable File
16 lines
299 B
Bash
Executable File
#!/bin/bash
|
|
|
|
hasext() {
|
|
for modname in "$1" "hgext.$1" "hgext3rd.$1"; do
|
|
${PYTHON:-python} -c "import $modname" 2> /dev/null && return 0
|
|
done
|
|
false
|
|
}
|
|
|
|
for extname in "$@"; do
|
|
hasext $extname || {
|
|
echo 'skipped: missing feature: '"$extname"
|
|
exit 80
|
|
}
|
|
done
|