-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* all other commands are in the same scope
- Loading branch information
1 parent
0fd8c3d
commit 6f54f79
Showing
2 changed files
with
37 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,3 @@ | ||
|
||
echo 'PHP configured version '${DEV_PHP}; | ||
. ./php-change "$@"; | ||
|
||
local versions="`dc php_versions`" v='' version='' dir=${DEV_WORKSPACE_PATH}; | ||
|
||
if [ -z "$1" ]; then | ||
exit 0; | ||
fi | ||
|
||
for v in ${versions}; do | ||
if [ "$1" == "${v}" ]; then | ||
version=${v}; | ||
fi | ||
done | ||
|
||
if [ -z "${version}" ]; then | ||
echo 'Provide valid PHP version `dev changephp {VERSION}`'; | ||
echo ${versions}; | ||
exit 1; | ||
fi | ||
|
||
if [ "${version}" == "${DEV_PHP}" ]; then | ||
exit 2; | ||
fi | ||
|
||
if [ -n "${DEV_PROJECTPATH}" ]; then | ||
dir=${DEV_WORKSPACE_PATH}/DEV_PROJECTPATH}; | ||
fi | ||
|
||
echo 'Update to '${version}; | ||
|
||
rm ${dir}/.php[1-9][0-9] >/dev/null 2>&1; | ||
touch ${dir}/.${version}; | ||
|
||
exit 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
echo 'PHP configured version '${DEV_PHP}; | ||
|
||
local versions="`dc php_versions`" v='' version='' dir=${DEV_WORKSPACE_PATH}; | ||
|
||
if [ -z "$1" ]; then | ||
exit 0; | ||
fi | ||
|
||
for v in ${versions}; do | ||
if [ "$1" == "${v}" ]; then | ||
version=${v}; | ||
fi | ||
done | ||
|
||
if [ -z "${version}" ]; then | ||
echo 'Provide valid PHP version `dev changephp {VERSION}`'; | ||
echo ${versions}; | ||
exit 1; | ||
fi | ||
|
||
if [ "${version}" == "${DEV_PHP}" ]; then | ||
exit 2; | ||
fi | ||
|
||
if [ -n "${DEV_PROJECTPATH}" ]; then | ||
dir=${DEV_WORKSPACE_PATH}/${DEV_PROJECTPATH}; | ||
fi | ||
|
||
echo 'Update to '${version}; | ||
|
||
rm ${dir}/.php[1-9][0-9] >/dev/null 2>&1; | ||
touch ${dir}/.${version}; | ||
|
||
exit 0; | ||
|