home *** CD-ROM | disk | FTP | other *** search
/ host-198-236-40-254.wlwv.k12.or.us / host-198-236-40-254.wlwv.k12.or.us.tar / host-198-236-40-254.wlwv.k12.or.us / tsu / BareMetalInstall.iso / tools / tgz2mo < prev    next >
Text File  |  2012-12-18  |  633b  |  27 lines

  1. #!/bin/bash
  2. # convert Slackware's TGZ package into .MO compressed file
  3. # which can be used as a LiveCD module
  4. #
  5. # Author: Tomas M. <http://www.linux-live.org>
  6. #
  7.  
  8. if [ "$1" = "" -o "$2" = "" ]; then
  9.    echo
  10.    echo "Convert Slackware's TGZ package into .MO compressed module"
  11.    echo "usage: $0 source_filename.tgz output_file.mo"
  12.    exit 1
  13. fi
  14.  
  15. PATH=.:$(dirname $0):/usr/lib:$PATH
  16. . liblinuxlive || exit 1
  17.  
  18. TMPDIR=/tmp/tgz2mo$$
  19.  
  20. installpkg -root $TMPDIR $1
  21. if [ $? != 0 ]; then echo "error installing package"; exit; fi
  22.  
  23. create_module $TMPDIR "$2"
  24. if [ $? != 0 ]; then echo "error building compressed image"; exit; fi
  25.  
  26. rm -Rf $TMPDIR
  27.