How to organize sources

Richard Lightman richard at reika.demon.co.uk
Thu Jan 18 08:17:09 PST 2001


Misquoted from Björn Lindberg on 2001/01/18 at 14:28 +0000:
> Hi everybody.
> 
> I am new to this list, but have been reading the archives for some
> weeks. I am in the process of installing my first lfs-system.
> 
> One thing I'm curious about, is how do you structure your sources?
> the book doesn't say anything about this. What I'm referring to is
> the fact that just downloading the base tarballs gives you nearly 60
> packages, and it seems kind of messy to keep them all in /usr/src.
> I was thinking about making subdirs to /usr/src either with 'themes'
> eg. "/dev" (development), "/file"; or maybe just using subdirs like
> /a, /b, /c, etc.
> 
> Just wondering how other people do it.
> 
> 
I have arange mine for easy backup, and for disaster recovery.
The static and chroot directories are enough to recompile LFS
It is not that hard to choose two are three directories with
a with a total size of 100MB (the size of my zip disks)

26M     /mnt/backup/sources/chroot
10M     /mnt/backup/sources/doc
47M     /mnt/backup/sources/gnome
33M     /mnt/backup/sources/graph
65M     /mnt/backup/sources/KDE
35M     /mnt/backup/sources/kernel
380k    /mnt/backup/sources/mine
41M     /mnt/backup/sources/net
78M     /mnt/backup/sources/options
20M     /mnt/backup/sources/sound
28M     /mnt/backup/sources/static
41M     /mnt/backup/sources/X11R6

#!/bin/bash

# ./fix directory source

# Covert source to bz2 and put in with the others

dest=/mnt/backup/sources/$1
if [ -d ]; then
  case ${2##*.} in
    gz)  gzip -cd $2 | bzip2 -9 > $dest/${2%gz}bz2 && \
         rm $2 && chmod 644 $dest/${2%gz}bz2 &;;
    bz2) mv $2 $dest/$2 && chmod 644 $dest/$2;;
    tgz) gzip -cd $2 | bzip2 -9 > $dest/${2%tgz}tar.bz2 && \
         rm $2 && chmod 644 $dest/${2%tgz}tar.bz2 &;;
    zip) mkdir ${2%.zip} &&\
         cd ${2%.zip} &&\
         unzip ../$2 &&\
         cd ..&&\
         tar -c ${2%.zip} | bzip2 -9 > $dest/${2%zip}tar.bz2 &&\
         rm -r ${2%.zip} &&\
         rm $2 && chmod 644 $dest/${2%zip}tar.bz2 &
         ;;
    *)   echo "What do I do with a ${2##*.} file?"
  esac
else
  echo "$dest is not a directory"
fi


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list