File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
2- basedir=" ` dirname " $0 " ` /../"
3- cd " $basedir "
4- basedir=` pwd`
2+ basedir=" $( dirname " $0 " ) /../"
3+ cd " $basedir " || exit
4+ basedir=" $( pwd) "
55binlink=" $basedir /current"
6- active=` basename $( readlink " $binlink " ) 2> /dev/null | sed -e ' s/^php-//;s/\./\\\\./g' `
6+ active=` basename " $( readlink " $binlink " ) " 2> /dev/null | sed -e ' s/^php-//;s/\./\\\\./g' `
77
88php_system=" "
99if [ -f " /usr/bin/php" ]; then
2323version=" $1 "
2424phpdir=" php-$version "
2525
26- if [ $version != " $php_system " ]; then
26+ if [ " $version " != " $php_system " ]; then
2727 if [ ! -d " $basedir /$phpdir " ]; then
2828 echo " PHP version $version is not installed"
2929 exit 2
3030 else
31- echo Setting active PHP version to $version
31+ echo " Setting active PHP version to $version "
3232 ln -sfT " $phpdir " " $binlink "
33- $basedir /current/bin/php --version
33+ " $basedir /current/bin/php" --version
3434 fi
35- else
35+ else
3636 echo " Setting active PHP version to system version ($version )"
3737 rm -f " $binlink "
3838 php --version
39- fi
39+ fi
You can’t perform that action at this time.
0 commit comments