Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F1691043
/usr/local/bin/run-php-script
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Feb 8 2022, 17:02
2022-02-08 17:02:27 (UTC+0)
Size
366 B
Referenced Files
None
Subscribers
None
/usr/local/bin/run-php-script
View Options
#!/bin/sh
COMMAND
=
$1
shift
if
[
-f vendor/bin/
$COMMAND
]
;
then
echo
"Switching to Composer
$COMMAND
:"
SCRIPT
=
vendor/bin/
$COMMAND
elif
[
-f /opt/
$COMMAND
.phar
]
;
then
SCRIPT
=
/opt/
$COMMAND
.phar
else
SCRIPT
=
$(
which
$COMMAND
)
2
> /dev/null
if
[
$?
-ne
0
]
;
then
echo
"No
$COMMAND
has been found."
exit
1
fi
fi
php
$SCRIPT
"
$@
"
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
930103
Default Alt Text
/usr/local/bin/run-php-script (366 B)
Attached To
Mode
P298 /usr/local/bin/run-php-script
Attached
Detach File
Event Timeline
Log In to Comment