Created
January 7, 2014 16:15
-
-
Save berezovskyi/8301728 to your computer and use it in GitHub Desktop.
Will output contents of a file installing all the packages previously installed by hand.
This file contains 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 | |
echo -e '#!/usr/bin/env bash\n' | |
echo -n 'sudo apt-get install -y ' | |
gzip -dc /var/log/apt/history.log*.gz | tee -a /var/log/apt/history.log | grep "Commandline: apt-get install" | sed 's/Commandline: apt-get install -y --force-yes//' |sed 's/Commandline: apt-get install -y//' | sed 's/Commandline: apt-get install//' | xargs echo $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample output:
#!/usr/bin/env bash sudo apt-get install -y nginx uwsgi uwsgi-plugin-python supervisor nmon php5-fpm subversion tree make xsltproc po4a mc python-mysqldb python-markdown php5-curl libapache2-mod-rpaf unzip daemontools openjdk-7-jdk build-essential python-dev uwsgi-plugin-python git libjpeg-dev jp2a python-scipy ipython sysstat openvpn nginx-full uwsgi-plugin-python python-pip memcached gcc le xclip