Skip to content

Commit

Permalink
add some missing -e option for echo in installer for colorize
Browse files Browse the repository at this point in the history
  • Loading branch information
neuberoliveira committed Feb 7, 2024
1 parent 68669fe commit 5adb2a3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/phpctl-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ else
SYMLINK_DIR=$1
fi

echo "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR"
echo -e "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR"
if [ -d "$INSTALL_DIR" ]; then
echo "The install directory is not empty. Attempting to remove it..."
rm -rI $INSTALL_DIR
Expand All @@ -24,19 +24,20 @@ while kill -0 $PID 2> /dev/null; do
sleep 0.1
done
done
printf "\r"


echo "\b "
if [ -z "$1" ]; then
echo -n "Sudo will be prompted to symlink the phpctl files."
else
echo -n "Files will be symlinked to ${SYMLINK_DIR}."
fi
echo -n " \033[0;32mDo you want to continue? (y/n)\033[0m "
echo -e -n " \033[0;32mDo you want to continue? (y/n)\033[0m "
read -r answer
if [ "$answer" != "${answer#[Yy]}" ]; then
$SUDO ${INSTALL_DIR}/scripts/symlink-bins.sh ${INSTALL_DIR}
else
echo "\033[0;31mTo use phpctl globally, link the cloned script to your bin directory, like:\033[0m"
echo -e "\033[0;31mTo use phpctl globally, link the cloned script to your bin directory, like:\033[0m"
echo ""
for file in "${INSTALL_DIR}"/bin/*; do
bin=$(basename "$file")
Expand Down

0 comments on commit 5adb2a3

Please sign in to comment.