check_version.sh
检查编译环境的版本情况,摘自Linux from Scratch LFS文档
#!/bin/bash
# Simple script to list version numbers of critical development tools
bash --version | head -n1 | cut -d" " -f2-4
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-4
bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1
find --version | head -n1
gawk --version | head -n1
gcc --version | head -n1
/lib/libc.so.6 | head -n1 | cut -d" " -f1-7
grep --version | head -n1
gzip --version | head -n1
make --version | head -n1
patch --version | head -n1
sed --version | head -n1
tar --version | head -n1
create_fhs.sh
创建符合FHS标准的根文件系统,摘自FHS文档
#!/bin/bash
#Create Standard Root Directory Structure
#Note: This scripts will create directory at current direcotry
install -d {bin,boot,dev,etc/opt,home,lib,mnt}
install -d {sbin,srv,usr/local,var,opt}
install -d root -m 0750
install -d tmp var/tmp -m 1777
install -d media/{floppy,cdrom}
install -d usr/{bin,include,lib,sbin,share,src}
ln -s share/{man,doc,info} usr
install -d usr/share/{doc,info,locale,man}
install -d usr/share/{misc,terminfo,zoneinfo}
install -d usr/share/man/man{1,2,3,4,5,6,7,8}
install -d usr/local/{bin,etc,include,lib,sbin,share,src}
ln -s share/{man,doc,info} usr/local
install -d usr/local/share/{doc,info,locale,man}
install -d usr/local/share/{misc,terminfo,zoneinfo}
install -d usr/local/share/man/man{1,2,3,4,5,6,7,8}
install -d var/{lock,log,mail,run,spool}
install -d var/{opt,cache,lib/{misc,locate},local}
install -d opt/{bin,doc,include,info}
install -d opt/{lib,man/man{1,2,3,4,5,6,7,8}}