home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / tools / mo2dir < prev    next >
Encoding:
Text File  |  2005-07-18  |  556 b   |  30 lines

  1. #!/bin/bash
  2. # convert .MO compressed file back into directory tree
  3. #
  4. # Author: Tomas M. <http://www.linux-live.org>
  5. #
  6.  
  7. if [ ! -d "$2" ]; then
  8.    echo 
  9.    echo "Convert .MO compressed module back into directory tree"
  10.    echo "usage: $0 source_file.mo existing_output_directory"
  11.    exit 1
  12. fi
  13.  
  14. if [ -a ./liblinuxlive ]; then
  15.    . ./liblinuxlive
  16. else
  17.    . /usr/lib/liblinuxlive || exit 1
  18. fi
  19.  
  20. allow_only_root
  21.  
  22. TMPDIR=/tmp/mo2dir$$
  23.  
  24. mkdir -p $TMPDIR
  25. mount_module "$1" "$TMPDIR"
  26. cp -R --preserve=all $TMPDIR/* "$2"
  27. umount "$TMPDIR"
  28. rmdir "$TMPDIR"
  29. /sbin/ldconfig
  30.