tazwok rev 276

Fixed update-repository to use PACKAGES_REPOSITORY so we can have :main in sources.list file for the packages we got there. This is better then them be all saying incoming sources when there not.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Feb 14 05:53:20 2011 +0000 (2011-02-14)
parents 8e0574acbdfa
children 4798e247d453
files update-repository
line diff
     1.1 --- a/update-repository	Mon Feb 14 04:53:58 2011 +0000
     1.2 +++ b/update-repository	Mon Feb 14 05:53:20 2011 +0000
     1.3 @@ -8,13 +8,15 @@
     1.4  WOK=$1/wok
     1.5  SOURCES_REPOSITORY=$1/src
     1.6  LOG_DIR=$1/log
     1.7 +PACKAGES_REPOSITORY=$1/packages
     1.8  
     1.9 -if [ -d "$WOK" ] && [ -d "$SOURCES_REPOSITORY" ] && [ -d "$LOG_DIR" ]; then
    1.10 +if [ -d "$WOK" ] && [ -d "$SOURCES_REPOSITORY" ] && [ -d "$LOG_DIR" ] && [ -d "$PACKAGES_REPOSITORY" ]; then
    1.11  	rm -f $SOURCES_REPOSITORY/sources.list
    1.12  else
    1.13  	echo "$1 doesn't looks like a LOCAL_REPOSITORY: it doesn't contains one or several of theses directories:
    1.14  	* $WOK
    1.15  	* $SOURCES_REPOSITORY
    1.16 +	* $PACKAGES_REPOSITORY
    1.17  	* $LOG_DIR"
    1.18  	exit
    1.19  fi
    1.20 @@ -46,10 +48,18 @@
    1.21  			fi
    1.22  		fi
    1.23  	fi
    1.24 -	if [ -f $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma ]; then
    1.25 -		echo -e "$PACKAGE:incoming\t${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" >> $SOURCES_REPOSITORY/sources.list
    1.26 - 	elif [ -f "SOURCES_REPOSITORY/$TARBALL" ]; then
    1.27 -		echo -e "$PACKAGE:incoming\t$TARBALL" >> $SOURCES_REPOSITORY/sources.list
    1.28 +	if [ -f $PACKAGES_REPOSITORY/$PACKAGE-$VERSION.tazpkg ]; then
    1.29 +		if [ -f $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma ]; then
    1.30 +			echo -e "$PACKAGE:main\t${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" >> $SOURCES_REPOSITORY/sources.list
    1.31 + 		elif [ -f "SOURCES_REPOSITORY/$TARBALL" ]; then
    1.32 +			echo -e "$PACKAGE:main\t$TARBALL" >> $SOURCES_REPOSITORY/sources.list
    1.33 +		fi
    1.34 +	else
    1.35 +		if [ -f $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma ]; then
    1.36 +			echo -e "$PACKAGE:incoming\t${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" >> $SOURCES_REPOSITORY/sources.list
    1.37 + 		elif [ -f "SOURCES_REPOSITORY/$TARBALL" ]; then
    1.38 +			echo -e "$PACKAGE:incoming\t$TARBALL" >> $SOURCES_REPOSITORY/sources.list
    1.39 +		fi
    1.40  	fi
    1.41  done
    1.42  echo "Done."