#!/bin/bash
# This script is to back up installed packages
# and restore them.
# taken from this guide http://eggsonbread.com/2010/01/28/move-ubuntu-to-another-computer-in-3-simple-steps/
# Create directory for list
p_dir=~/.installedPackages
# Create list of installed packages
dpkg --get-selections \
| sed "s/.*deinstall//" \
| sed "s/install$//g" \
> $p_dir/packageList
# To reinstall the packages there's going to have to be
# some kind of if condition, or possibly a rsync job to
# create the package list folder.