Skip to content

Commit e310789

Browse files
committed
Add has_extension helper
1 parent b0fd596 commit e310789

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

install-extensions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ die() {
1111
exit 1
1212
}
1313

14+
has_extension() {
15+
local extension="$1"
16+
php -m | awk -vrc=1 -vextension="$extension" '$1 == extension { rc=0 } END { exit rc }'
17+
}
18+
1419
install_xhprof() {
1520
local version="${1:-stable}"
1621

0 commit comments

Comments
 (0)