Skip to content

Commit 262b07c

Browse files
committed
Use ext variable
1 parent 8a4d2aa commit 262b07c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

install-extensions.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ has_extension() {
1717
}
1818

1919
install_xhprof() {
20-
local version="${1:-stable}"
20+
local ext="xhprof" version="${1:-stable}"
2121

22-
has_extension "xhprof" && return 0
23-
pecl install xhprof-$version
22+
has_extension "$ext" && return 0
23+
pecl install "$ext-$version"
2424
}
2525

2626
install_mongo() {
27-
echo no | pecl install mongo
27+
local ext="mongo" version="${1:-stable}"
28+
29+
echo no | pecl install "$ext-$version"
2830
}
2931

3032
install_mongodb() {

0 commit comments

Comments
 (0)