Magellan Linux

Diff of /branches/mage-next/src/smage2.in

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

revision 1081 by niro, Mon Jun 28 17:47:38 2010 UTC revision 1273 by niro, Wed Apr 27 09:45:07 2011 UTC
# Line 50  export LC_ALL=C Line 50  export LC_ALL=C
50    
51  source /etc/mage.rc.global  source /etc/mage.rc.global
52  source ${MAGERC}  source ${MAGERC}
53    source ${MLIBDIR}/mage4.functions.sh
54    
55  # set PKGDIR and BUILDDIR and BINDIR to MROOT  # set PKGDIR and BUILDDIR and BINDIR to MROOT
56  if [[ -n ${MROOT} ]]  if [[ -n ${MROOT} ]]
# Line 153  download_sources() Line 154  download_sources()
154   local DB_MD5_SUM_FILE="${MD5DIR}/$(basename ${SMAGENAME} .${SMAGESUFFIX}).md5"   local DB_MD5_SUM_FILE="${MD5DIR}/$(basename ${SMAGENAME} .${SMAGESUFFIX}).md5"
155   local FETCHING   local FETCHING
156   local i mirror   local i mirror
157     local wget_opts
158    
159     # filter wget command if busybox was found
160     wget_opts="$(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})"
161    
162   # install SRCDIR/PNAME if not exist   # install SRCDIR/PNAME if not exist
163   [ ! -d ${SOURCEDIR}/${PNAME} ] && install -d ${SOURCEDIR}/${PNAME}   [ ! -d ${SOURCEDIR}/${PNAME} ] && install -d ${SOURCEDIR}/${PNAME}
164    
165   # check if FETCHING is needed   # check if FETCHING is needed
166   ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} &> /dev/null )   ( cd ${SOURCEDIR}/${PNAME}; md5sum -c ${DB_MD5_SUM_FILE} &> /dev/null )
167   if [[ $? = 0 ]]   if [[ $? = 0 ]]
168   then   then
169   # md5's ok, no fetching needed   # md5's ok, no fetching needed
# Line 198  download_sources() Line 202  download_sources()
202   then   then
203   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
204   wget \   wget \
205   --passive-ftp \   ${wget_opts} \
  --tries 3 \  
  --continue \  
  --progress bar \  
206   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
207   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
208   if [[ $? = 0 ]]   if [[ $? = 0 ]]
# Line 222  download_sources() Line 223  download_sources()
223   then   then
224   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
225   wget \   wget \
226   --passive-ftp \   ${wget_opts} \
  --tries 3 \  
  --continue \  
  --progress bar \  
227   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
228   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
229   if [[ $? = 0 ]]   if [[ $? = 0 ]]
# Line 246  download_sources() Line 244  download_sources()
244   then   then
245   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
246   wget \   wget \
247   --passive-ftp \   ${wget_opts} \
  --tries 3 \  
  --continue \  
  --progress bar \  
248   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
249   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
250   if [[ $? = 0 ]]   if [[ $? = 0 ]]
# Line 270  download_sources() Line 265  download_sources()
265   then   then
266   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
267   wget \   wget \
268   --passive-ftp \   ${wget_opts} \
  --tries 3 \  
  --continue \  
  --progress bar \  
269   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
270   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
271   if [[ $? = 0 ]]   if [[ $? = 0 ]]
# Line 294  download_sources() Line 286  download_sources()
286   then   then
287   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
288   wget \   wget \
289   --passive-ftp \   ${wget_opts} \
  --tries 3 \  
  --continue \  
  --progress bar \  
290   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
291   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
292   if [[ $? = 0 ]]   if [[ $? = 0 ]]
# Line 313  download_sources() Line 302  download_sources()
302   then   then
303   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI}${COLDEFAULT}"
304   wget \   wget \
305   --passive-ftp \   ${wget_opts} \
  --tries 3 \  
  --continue \  
  --progress bar \  
306   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI})" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI})" \
307   "${my_SRC_URI}"   "${my_SRC_URI}"
308   fi   fi
# Line 332  download_sources() Line 318  download_sources()
318   # recheck md5 sums   # recheck md5 sums
319   echo   echo
320   echo -e "${COLBLUE}===${COLGREEN} Checking MD5 sums:${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} Checking MD5 sums:${COLDEFAULT}"
321   ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} ) || die "md5 failed"   ( cd ${SOURCEDIR}/${PNAME}; md5sum -c ${DB_MD5_SUM_FILE} ) || die "md5 failed"
322   echo   echo
323    
324   # not needed anymore   # not needed anymore
# Line 1188  fi Line 1174  fi
1174  # creates md5sums for smages to given dir  # creates md5sums for smages to given dir
1175  if [[ $1 = calcmd5 ]]  if [[ $1 = calcmd5 ]]
1176  then  then
1177   if [ $# -ge 3 ]   if [ $# -ge 2 ]
1178   then   then
1179   SMAGENAME="$2"   SMAGENAME="$2"
1180   MD5DIR="$3"   MD5DIR="$3"
1181     [[ -z ${MD5DIR} ]] && MD5DIR="$(dirname ${SMAGENAME})/md5"
1182    
1183   source ${SMAGENAME} || die "download source failed"   source ${SMAGENAME} || die "download source failed"
1184    
1185   # overridable sourcedir; must be declared after source of the smage2   # overridable sourcedir; must be declared after source of the smage2
# Line 1244  then Line 1232  then
1232   echo   echo
1233   else   else
1234   echo "Usage: Calculating MD5 Sums:"   echo "Usage: Calculating MD5 Sums:"
1235   echo "    $(basename $0) calcmd5 /path/to/SMAGENAME /path/to/MD5DIR"   echo "    $(basename $0) calcmd5 /path/to/SMAGENAME [/path/to/MD5DIR]"
1236   echo   echo
1237   echo   echo
1238   echo "Export the CALC_SOURCEDIR variable to override current SOURCEDIRs."   echo "Export the CALC_SOURCEDIR variable to override current SOURCEDIRs."
# Line 1538  case ${NOSTRIP} in Line 1526  case ${NOSTRIP} in
1526   then   then
1527   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
1528   do   do
1529   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"
1530   mstripbins ${BINDIR}_${subpackage}   mstripbins ${BINDIR}_${subpackage}
1531   echo -e "${COLBLUE}===${COLGREEN} stripping libraries for '${subpackage}' ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping libraries for '${subpackage}' ...${COLDEFAULT}"
1532   mstriplibs ${BINDIR}_${subpackage}   mstriplibs ${BINDIR}_${subpackage}
1533   done   done
1534   else   else

Legend:
Removed from v.1081  
changed lines
  Added in v.1273