Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion phalcon.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/bin/bash

if [ -z "$PTOOLSPATH" ]; then
export PTOOLSPATH=.
if [ "$0" == "-bash" ];
then
echo "Phalcon devtools install. PhalconPHP 2012. Make sure phalcon.sh is in the same dir as phalcon.php and that you run this with sudo or as root."
echo "Installing Devtools..."
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PTOOLSPATH=$DIR
export PATH=$PATH:$DIR
echo "Working dir is: "$DIR
else
echo 'Run this installer with ". ./phalcon.sh". Exiting...'
exit
fi
fi
app="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! -L $app/phalcon ]; then
echo "Generating symlink"
ln -s $app/phalcon.sh $app/phalcon
chmod +x $app/phalcon
echo "Done. Devtools installed!"
else
php "$PTOOLSPATH/phalcon.php" $*
fi