Created
May 27, 2016 00:41
-
-
Save theodorosploumis/02b4e4df8989cb0072dfbbbdf89922bd to your computer and use it in GitHub Desktop.
Print versions of software installed. Useful for README.txt, CHANGELOG.txt etc. Mainly for Drupal.
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
#!/usr/bin/env bash | |
# Print versions of installed software | |
# bash /scripts/software.sh >> /SOFTWARE.txt | |
# Print distribution info | |
echo -e "-----------------------------------\n" | |
echo -e "$(uname -a)" | |
echo -e "---------------------------------- \n" | |
# Print date created | |
echo -e "Date: $(date)\n" | |
# Prints installed packages | |
# 6 items list | |
dpkg --list | grep -E '(^|\s)php5-cli($|\s)|(^|\s)phpmyadmin($|\s)|(^|\s)mysql-server($|\s)|(^|\s)apache2($|\s)|(^|\s)supervisor($|\s)|(^|\s)php5-xdebug($|\s)' \ | |
| awk '{ print NR ". " $2 ": " $3 }' | |
# Print Drush version | |
echo "7. drush: $(drush --version | awk '{print $4}')" | |
# Print drupal console version | |
echo "8. drupal: $(drupal --version | awk '{print $4}')" | |
# Print composer version | |
echo -e "9. composer: $(composer --version | awk '{ print $3}')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment