Skip to content

Commit

Permalink
refactor(installer): POSIX Shell
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Dec 6, 2023
1 parent edee698 commit b47ed53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

### Install
```shell
wget https://raw.githubusercontent.com/opencodeco/phpctl/main/installer.sh -qO- | bash
wget https://raw.githubusercontent.com/opencodeco/phpctl/main/installer.sh -qO- | sh
```

## Usage
Expand Down
8 changes: 4 additions & 4 deletions installer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

INSTALL_DIR=~/.phpctl

Expand All @@ -7,16 +7,16 @@ symlink() {
sudo ln -sf "${INSTALL_DIR}/phpctl" /usr/local/bin/pctl
}

echo -e "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR"
echo "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR"
rm -rf $INSTALL_DIR
git clone --quiet https://github.com/opencodeco/phpctl.git $INSTALL_DIR

echo -e "Sudo will be prompted to symlink the phpctl files. \033[0;32mDo you want to continue? (y/n)\033[0m"
echo "Sudo will be prompted to symlink the phpctl files. \033[0;32mDo you want to continue? (y/n)\033[0m"
read answer
if [ "$answer" != "${answer#[Yy]}" ]; then
symlink
else
echo -e "\033[0;31mTo use phpclt globally, link the cloned script to your bin directory, like:\033[0m"
echo "\033[0;31mTo use phpclt globally, link the cloned script to your bin directory, like:\033[0m"
echo ""
echo " sudo ln -sf ${INSTALL_DIR}/phpctl /usr/local/bin/phpctl"
echo " sudo ln -sf ${INSTALL_DIR}/phpctl /usr/local/bin/pctl"
Expand Down

0 comments on commit b47ed53

Please sign in to comment.