mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
2e143f9478
It should use `$modname` instead of `$1`.
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
|