home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / A / E2FSBN / SLACKBUI < prev   
Encoding:
Text File  |  1995-04-20  |  2.5 KB  |  86 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-e2fsbn
  8. SRC=/devel/manpagesrc
  9. INFO=/devel/info-pages/usr/info
  10. TEX=/devel/texinfo-docs
  11.  
  12. if [ ! -d $TMP ]; then
  13.   mkdir -p $TMP # location to build the source
  14. fi
  15. if [ ! -d $PKG ]; then
  16.   mkdir -p $PKG # place for the package to be built
  17. fi
  18.  
  19. # Explode the package framework:
  20. cd $PKG
  21. tar xzvf $CWD/_e2fsbn.tar.gz
  22.  
  23. # Function to handle manpage source:
  24. man2gz () { # $1 is source page name, $2 is target name for preformatted
  25.             # output (full path && name) and $3 is the same, but for the
  26.             # source.
  27.   mkdir -p `dirname $2`
  28.   groff -Tascii -mandoc $1 | gzip -9c > $2
  29.   if [ ! "$3" = "" ]; then
  30.     mkdir -p `dirname $3`
  31.     cat $1 > $3 
  32.   fi 
  33. }
  34.  
  35. echo "+================+"
  36. echo "| e2fsprogs-0.5a |"
  37. echo "+================+"
  38. cd $TMP
  39. tar xzvf $CWD/e2fsprogs-0.5b.tar.gz
  40. cd e2fsprogs-0.5b
  41. make world
  42. cd e2fsck
  43. strip e2fsck
  44. cat e2fsck > $PKG/sbin/e2fsck
  45. man2gz e2fsck.8 $PKG/usr/man/preformat/cat8/e2fsck.8.gz $SRC/usr/man/man8/e2fsck.8
  46. cd ../misc
  47. strip badblocks chattr dumpe2fs lsattr mke2fs mklost+found tune2fs fsck
  48. cat fsck > $PKG/sbin/fsck
  49. cat badblocks > $PKG/sbin/badblocks
  50. cat chattr > $PKG/sbin/chattr
  51. cat dumpe2fs > $PKG/sbin/dumpe2fs
  52. cat lsattr > $PKG/sbin/lsattr
  53. cat mke2fs > $PKG/sbin/mke2fs
  54. cat mklost+found > $PKG/sbin/mklost+found
  55. cat tune2fs > $PKG/sbin/tune2fs
  56. man2gz badblocks.8 $PKG/usr/man/preformat/cat8/badblocks.8.gz $SRC/usr/man/man8/badblocks.8
  57. man2gz chattr.1 $PKG/usr/man/preformat/cat1/chattr.1.gz $SRC/usr/man/man1/chattr.1
  58. man2gz dumpe2fs.8 $PKG/usr/man/preformat/cat8/dumpe2fs.8.gz $SRC/usr/man/man8/dumpe2fs.8
  59. man2gz fsck.8 $PKG/usr/man/preformat/cat8/fsck.8.gz $SRC/usr/man/man8/fsck.8
  60. man2gz lsattr.1 $PKG/usr/man/preformat/cat1/lsattr.1.gz $SRC/usr/man/man1/lsattr.1
  61. man2gz mke2fs.8 $PKG/usr/man/preformat/cat8/mke2fs.8.gz $SRC/usr/man/man8/mke2fs.8
  62. man2gz mklost+found.8 $PKG/usr/man/preformat/cat8/mklost+found.8.gz $SRC/usr/man/man8/mklost+found.8
  63. man2gz tune2fs.8 $PKG/usr/man/preformat/cat8/tune2fs.8.gz $SRC/usr/man/man8/tune2fs.8
  64. cd ../debugfs
  65. strip debugfs
  66. cat debugfs > $PKG/sbin/debugfs
  67. man2gz debugfs.8 $PKG/usr/man/preformat/cat8/debugfs.8.gz $SRC/usr/man/man8/debugfs.8
  68. cd ../lib/ss
  69. cat libss.so.1.0 > $PKG/lib/libss.so.1.0
  70. cd ../et
  71. cat libet.so.1.0 > $PKG/lib/libet.so.1.0
  72. cd ../ext2fs
  73. cat libe2fs.so.1.0 > $PKG/lib/libe2fs.so.1.0
  74. cd ../e2p
  75. cat libe2p.so.1.0 > $PKG/lib/libe2p.so.1.0
  76.  
  77. # Build the package:
  78. cd $PKG
  79. tar czvf $TMP/e2fsbn.tgz .
  80.  
  81. # Clean up the extra stuff:
  82. if [ "$1" = "--cleanup" ]; then
  83.   rm -rf $TMP/e2fsprogs-0.5b
  84.   rm -rf $PKG
  85. fi
  86.