Magellan Linux

Diff of /trunk/mage/usr/lib/mage/pkgbuild_dir.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 272 by niro, Fri Oct 21 14:23:59 2005 UTC revision 347 by niro, Sat Mar 4 23:29:45 2006 UTC
# Line 4  Line 4 
4  # builds packages from given dir  # builds packages from given dir
5  #  #
6    
7  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/pkgbuild_dir.sh,v 1.9 2005-10-21 14:23:59 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/pkgbuild_dir.sh,v 1.12 2006-03-04 23:29:35 niro Exp $
8    
9  PKGSUFFIX="mpk"  PKGSUFFIX="mpk"
10  PKGNAME="$1"  PKGNAME="$1"
# Line 30  else Line 30  else
30  fi  fi
31  source ${MLIBDIR}/mage4.functions.sh  source ${MLIBDIR}/mage4.functions.sh
32    
33    # set PKGDIR and BUILDDIR and BINDIR to MROOT
34    if [[ -n ${MROOT} ]]
35    then
36     export PKGDIR=${MROOT}/${PKGDIR}
37     export BUILDDIR=${MROOT}/${BUILDDIR}
38     export BINDIR=${MROOT}/${BINDIR}
39    fi
40    
41  build_preinstall()  build_preinstall()
42  {  {
43   if [ -d ${BUILDDIR}/${PKGNAME} ]   if [ -d ${BUILDDIR}/${PKGNAME} ]
# Line 117  build_postinstall() Line 125  build_postinstall()
125   ;;   ;;
126    
127   "character special file")   "character special file")
128   echo "${I#${SEARCHDIRS}*}§${FILEPOSIX}" >> ${BUILDDIR}/${PKGNAME}/.char   # convert hex2dec
129     #  printf '%d' 0x12 -> 18
130     local CHAR_MAJOR="$(printf 0x$(stat -c %t $I))"
131     local CHAR_MINOR="$(printf 0x$(stat -c %T $I))"
132     echo "${I#${SEARCHDIRS}*}§${FILEPOSIX}§${CHAR_MAJOR}§${CHAR_MINOR}" >> ${BUILDDIR}/${PKGNAME}/.char
133   ;;   ;;
134    
135   *)   *)

Legend:
Removed from v.272  
changed lines
  Added in v.347