slitaz-modular rev 102

Fixed local-mirror script to make $COOKING and $STABLE folders.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri May 13 18:22:06 2011 +0000 (2011-05-13)
parents 036e0267ec00
children 5933a4c548ba
files initramfs/usr/bin/local-mirror
line diff
     1.1 --- a/initramfs/usr/bin/local-mirror	Thu May 12 22:07:51 2011 +0000
     1.2 +++ b/initramfs/usr/bin/local-mirror	Fri May 13 18:22:06 2011 +0000
     1.3 @@ -35,8 +35,6 @@
     1.4  BOOT_WWW_DIR="$REPOS_DIR/slitaz-forge/boot"
     1.5  TANK_WWW_DIR="$REPOS_DIR/slitaz-forge/tank/web"
     1.6  
     1.7 -
     1.8 -
     1.9  if [ "$COMMAND" = "tank-only" ]; then
    1.10  	WWW="${WWW/mirror/}"
    1.11  	ADDRESS="${ADDRESS/mirror.slitaz.org/}"
    1.12 @@ -51,7 +49,7 @@
    1.13  
    1.14  [ -d $REPOS_DIR ] || continue
    1.15  
    1.16 -INCOMING_REPOSITORY="$LOCAL_REPOSITORY/packages-incoming"
    1.17 +INCOMING_REPOSITORY="$COOKING/packages-incoming"
    1.18  CRON_FILE="/var/spool/cron/crontabs/root"
    1.19  
    1.20  www() {
    1.21 @@ -73,6 +71,9 @@
    1.22  	elif [ -d $REPOS_DIR/wok ]; then
    1.23  		REPO_WOK=$REPOS_DIR/wok
    1.24  	fi
    1.25 +	[ -d $STABLE ] || mkdir -p $STABLE
    1.26 +	[ -d $COOKING ] || mkdir -p $COOKING
    1.27 +
    1.28  	case "$b" in
    1.29  		website)
    1.30  			[ -d $REPOS_DIR/$b ] && ln -s $REPOS_DIR/$b $MAIN_WWW_DIR
    1.31 @@ -120,6 +121,8 @@
    1.32  			[ -f $INCOMING_REPOSITORY/packages.list ] || touch $INCOMING_REPOSITORY/packages.list
    1.33  			[ -f $INCOMING_REPOSITORY/packages.md5 ] || touch $INCOMING_REPOSITORY/packages.md5
    1.34  			[ -f $INCOMING_REPOSITORY/packages.txt ] || touch $INCOMING_REPOSITORY/packages.txt
    1.35 +			[ -d $PKGDIR ] && ln -sf $PKGDIR $COOKING/packages
    1.36 +			[ -d $SRCDIR ] && ln -sf $SRCDIR $COOKING/src
    1.37  			if [ "$CUSTOM_WOK" = "yes" ]; then
    1.38  				tazwok gen-wok-db --WOK=$REPO_WOK
    1.39  				if [ -f $COOKORDER ]; then
    1.40 @@ -160,9 +163,6 @@
    1.41  			[ -d $REPOS_DIR/flavors-stable ] && ln -sf $REPOS_DIR/flavors-stable $STABLE/flavors
    1.42  			#[ -d $COOKING/wok ] || ln -sf $REPOS_DIR/wok $COOKING/clean-wok
    1.43  			[ -d $STABLE/clean-wok ] || ln -sf $REPOS_DIR/wok-stable $STABLE/clean-wok
    1.44 -			[ -d $PKGDIR ] && ln -sf $PKGDIR $LOCAL_REPOSITORY/packages
    1.45 -			[ -d $SRCDIR ] && ln -sf $SRCDIR $LOCAL_REPOSITORY/src
    1.46 -			
    1.47  			if [ -f "/usr/bin/tazpkg-web" ]; then
    1.48  				tazpkg-web cooking
    1.49  				if [ ! $(grep -l "/usr/bin/tazpkg-web cooking" $CRON_FILE) ]; then