diff --git a/README.md b/README.md index e975829..c840f97 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,14 @@ phpup - CLI tool for managing PHP environments +## Installation + +macOS + +```sh +curl -fsSL https://raw.githubusercontent.com/priyashpatil/phpup/main/install/mac.sh | bash +``` + ## Roadmap - [ ] Easy to install cross platform script diff --git a/install/mac.sh b/install/mac.sh index b094102..cd92ba8 100755 --- a/install/mac.sh +++ b/install/mac.sh @@ -22,13 +22,13 @@ fi RELEASE_TAG=$(curl -s "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest" | grep -o '"tag_name": "[^"]*' | sed 's/"tag_name": "//') +# Echo which version is being downloaded +echo -e "Downloading phpup version $RELEASE_TAG \n" + # Get the download URL for the asset DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/tags/$RELEASE_TAG" | grep -o "https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/$RELEASE_TAG/$ASSET_NAME") -# Echo which version is being downloaded -echo "Downloading phpup version $RELEASE_TAG" - # Download the asset curl -L -o "$ASSET_NAME" "$DOWNLOAD_URL" @@ -36,6 +36,7 @@ curl -L -o "$ASSET_NAME" "$DOWNLOAD_URL" chmod +x "$ASSET_NAME" # Move the binary to a directory in PATH -# sudo mv "$ASSET_NAME" /usr/local/bin/phpup +echo -e "\nInstalling phpup to /usr/local/bin/phpup" +sudo mv "$ASSET_NAME" /usr/local/bin/phpup -echo "phpup has been installed successfully!" +echo -e "\nphpup has been installed successfully! 🎉"