Magellan Linux

Diff of /tags/mage-0_4_23/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 419 by niro, Mon Jan 22 00:24:14 2007 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.13 2007-01-22 00:24:14 niro Exp $
8    
9    # set default user mage.rc
10    : ${MAGERC="/etc/mage.rc"}
11    
12  PKGSUFFIX="mpk"  PKGSUFFIX="mpk"
13  PKGNAME="$1"  PKGNAME="$1"
# Line 21  export LC_ALL=C Line 24  export LC_ALL=C
24  [[ -z $1 ]] && echo "No package name given. Aborting." && exit 1  [[ -z $1 ]] && echo "No package name given. Aborting." && exit 1
25  [[ -z $2 ]] && echo "No source dir given. Aborting." && exit 1  [[ -z $2 ]] && echo "No source dir given. Aborting." && exit 1
26    
27  if [ -f /etc/mage.rc ]  if [ -f ${MAGERC} ]
28  then  then
29   source /etc/mage.rc   source ${MAGERC}
30  else  else
31   echo "Your /etc/mage.rc is missing. Aborting."   echo "Your ${MAGERC} is missing. Aborting."
32   exit 1   exit 1
33  fi  fi
34  source ${MLIBDIR}/mage4.functions.sh  source ${MLIBDIR}/mage4.functions.sh
35    
36    # set PKGDIR and BUILDDIR and BINDIR to MROOT
37    if [[ -n ${MROOT} ]]
38    then
39     export PKGDIR=${MROOT}/${PKGDIR}
40     export BUILDDIR=${MROOT}/${BUILDDIR}
41     export BINDIR=${MROOT}/${BINDIR}
42    fi
43    
44  build_preinstall()  build_preinstall()
45  {  {
46   if [ -d ${BUILDDIR}/${PKGNAME} ]   if [ -d ${BUILDDIR}/${PKGNAME} ]
# Line 117  build_postinstall() Line 128  build_postinstall()
128   ;;   ;;
129    
130   "character special file")   "character special file")
131   echo "${I#${SEARCHDIRS}*}§${FILEPOSIX}" >> ${BUILDDIR}/${PKGNAME}/.char   # convert hex2dec
132     #  printf '%d' 0x12 -> 18
133     local CHAR_MAJOR="$(printf 0x$(stat -c %t $I))"
134     local CHAR_MINOR="$(printf 0x$(stat -c %T $I))"
135     echo "${I#${SEARCHDIRS}*}§${FILEPOSIX}§${CHAR_MAJOR}§${CHAR_MINOR}" >> ${BUILDDIR}/${PKGNAME}/.char
136   ;;   ;;
137    
138   *)   *)

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