Added switch to skipp packages dowload.
This commit is contained in:
parent
44f88e31e9
commit
07f47df141
1 changed files with 38 additions and 26 deletions
64
jhalfs
64
jhalfs
|
@ -22,7 +22,8 @@ Options:
|
||||||
DIR/jhalfs
|
DIR/jhalfs
|
||||||
-D, --download-client=CLIENT use CLIENT as the program for retrieving
|
-D, --download-client=CLIENT use CLIENT as the program for retrieving
|
||||||
packages
|
packages
|
||||||
-T, --no-testsuites don't run the package's testsuites.
|
-T, --no-testsuites don't run the package's testsuites
|
||||||
|
-P, --have-packages don't download the packages
|
||||||
"
|
"
|
||||||
|
|
||||||
help="\
|
help="\
|
||||||
|
@ -84,6 +85,12 @@ while test $# -gt 0 ; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--have-packages | -P )
|
||||||
|
shift
|
||||||
|
HPKG=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
echo "$usage"
|
echo "$usage"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -221,37 +228,41 @@ download() {
|
||||||
|
|
||||||
get_sources() {
|
get_sources() {
|
||||||
|
|
||||||
# This variable is necessary to make sure the `cat $JHALFSDIR/packages`
|
# Test if the packages must be downloaded
|
||||||
# separates each iteration by lines. It is necessary to have the second
|
if [ -z $HPKG ] ; then
|
||||||
# ' on the next line.
|
|
||||||
IFS='
|
# This variable is necessary to make sure the `cat $JHALFSDIR/packages`
|
||||||
|
# separates each iteration by lines. It is necessary to have the second
|
||||||
|
# ' on the next line.
|
||||||
|
IFS='
|
||||||
'
|
'
|
||||||
|
|
||||||
if [ ! -d $BUILDDIR/sources ] ; then mkdir $BUILDDIR/sources ; fi
|
if [ ! -d $BUILDDIR/sources ] ; then mkdir $BUILDDIR/sources ; fi
|
||||||
cd $BUILDDIR/sources
|
cd $BUILDDIR/sources
|
||||||
if [ -f MD5SUMS ] ; then rm MD5SUMS ; fi
|
if [ -f MD5SUMS ] ; then rm MD5SUMS ; fi
|
||||||
|
|
||||||
download "" MD5SUMS
|
download "" MD5SUMS
|
||||||
|
|
||||||
# Iterate through each package and grab it, along with any patches it needs.
|
# Iterate through each package and grab it, along with any patches it needs.
|
||||||
for i in `cat $JHALFSDIR/packages` ; do
|
for i in `cat $JHALFSDIR/packages` ; do
|
||||||
PKG=`echo $i | sed 's/-version.*//'`
|
PKG=`echo $i | sed 's/-version.*//'`
|
||||||
|
|
||||||
# Someone used some silly entities right next to the valid package entities.
|
# Someone used some silly entities right next to the valid package entities.
|
||||||
if [ "$PKG" = "expect-lib" -o "$PKG" = "linux-dl" ] ; then continue ; fi
|
if [ "$PKG" = "expect-lib" -o "$PKG" = "linux-dl" ] ; then continue ; fi
|
||||||
|
|
||||||
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
||||||
if [ "$PKG" = "tcl" ] ; then
|
if [ "$PKG" = "tcl" ] ; then
|
||||||
FILE="$PKG$VRS-src.tar.bz2"
|
FILE="$PKG$VRS-src.tar.bz2"
|
||||||
else
|
else
|
||||||
FILE="$PKG-$VRS.tar.bz2"
|
FILE="$PKG-$VRS.tar.bz2"
|
||||||
fi
|
fi
|
||||||
download $PKG $FILE
|
download $PKG $FILE
|
||||||
for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do
|
for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do
|
||||||
PATCH=`echo $patch | sed 's@&'$PKG'-version;@'$VRS'@'`
|
PATCH=`echo $patch | sed 's@&'$PKG'-version;@'$VRS'@'`
|
||||||
download $PKG $PATCH
|
download $PKG $PATCH
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
build_Makefile() {
|
build_Makefile() {
|
||||||
|
@ -288,7 +299,8 @@ build_Makefile() {
|
||||||
FILE="$name-$vrs.tar.bz2"
|
FILE="$name-$vrs.tar.bz2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Insert instructions for unpacking the package and changing directories
|
# Insert instructions for unpacking the package and to set
|
||||||
|
# the PKGDIR variable.
|
||||||
echo -e "\t\$(call unpack-lfs,$FILE) && \\" >> $MKFILE.tmp
|
echo -e "\t\$(call unpack-lfs,$FILE) && \\" >> $MKFILE.tmp
|
||||||
echo -e "\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
|
echo -e "\tROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp
|
||||||
echo -e "\tchown -R lfs \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
|
echo -e "\tchown -R lfs \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp
|
||||||
|
|
Reference in a new issue