Last active
November 29, 2022 21:31
-
-
Save mehdichaouch/2cb503e63e9cd75f990612633604fd11 to your computer and use it in GitHub Desktop.
m2-dev-tools.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | |
# @author Mehdi Chaouch <[email protected]> <@advocodo> | |
# @copyright Copyright (c) 2020 ADVOCODO (https://www.advocodo.com) | |
# @description This script install some developer tools for Magento 2 | |
# @usage ./m2-dev-tools.sh | |
### | |
#set -v | |
#set -x | |
START=`date +%s` | |
CURRENT_DATE=`date +%Y%m%d-%H%M%S` | |
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
PROGNAME=`basename $0` | |
# n98-magerun2.phar | |
# curl -Sso n98-magerun2.phar "https://files.magerun.net/n98-magerun2-3.2.0.phar" && printf "🍺 Downloaded n98-magerun2.phar successfully\n" || (printf "⚠️ Error downloading n98-magerun2.phar\n" && exit 1) | |
curl -Sso n98-magerun2.phar "https://files.magerun.net/n98-magerun2.phar" && printf "🍺 Downloaded n98-magerun2.phar successfully\n" || (printf "⚠️ Error downloading n98-magerun2.phar\n" && exit 1) | |
chmod +x ./n98-magerun2.phar && printf "🍺 Changed n98-magerun2.phar permissions successfully\n" || (printf "⚠️ Error changing n98-magerun2.phar permissions\n" && exit 1) | |
mv ./n98-magerun2.phar /usr/bin/n98-magerun2.phar && printf "🍺 Moved n98-magerun2.phar successfully\n" || (printf "⚠️ Error moving n98-magerun2.phar\n" && exit 1) | |
# Ask to continue | |
#read -p "Delete $0? (y/n)" -n 1 -r | |
#echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
cd $CURRENT_DIR && rm ./m1-dev-tools.sh | |
fi | |
echo "🏁 Dev tools install done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment