#!/bin/bash # squash_portage # # Author: Magnus Rosenbaum # Project Homepage: http://cmr.cx/squash_portage/ # # Requirements: # - sys-fs/squashfs-tools # - squashfs kernel patch from http://squashfs.sourceforge.net/ # # Installation: # # - Put this script to for example /usr/local/sbin and make sure it is # executable only by root. # # - If your "distfiles" and "packages" directories still reside in /usr/portage, # move them for example to /var/portage: # # # mkdir /var/portage # # mv /usr/portage/packages /usr/portage/distfiles /var/portage # # Then you have to add the following to /etc/make.conf: # # PKGDIR="/var/portage/packages" # DISTDIR="/var/portage/distfiles" # # - Add the following line to your /etc/fstab: # # /usr/portage.squashfs /usr/portage squashfs loop,ro 0 0 # # - Start the inital squashing: # # # squash_portage squash # # - Use portage as usual. The only difference is, that you have to use # "squash_portage sync" instead of "emerge --sync" or "eix-sync" now. # # Configuration (only needed for use on multiple machines) SYNC_HOST=detritus REMOTE_PORTAGE=/automnt/vol1/usr/portage REMOTE_FILE=/automnt/vol1/usr/portage.squashfs function help { cat <