tazwok rev 293
Fix: create missing files at right time (thanks Xfred)
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Wed Feb 16 02:45:16 2011 +0100 (2011-02-16) |
parents | a0e786e28a24 |
children | 39056427ae5d |
files | tazwok |
line diff
1.1 --- a/tazwok Tue Feb 15 03:10:27 2011 +0100 1.2 +++ b/tazwok Wed Feb 16 02:45:16 2011 +0100 1.3 @@ -119,9 +119,6 @@ 1.4 # Basically, get theses files from the net if they are missing. 1.5 dep_db=$INCOMING_REPOSITORY/wok-depends.txt 1.6 wan_db=$INCOMING_REPOSITORY/wok-wanted.txt 1.7 - [ -f $dep_db ] || touch $dep_db 1.8 - [ -f $wan_db ] || touch $wan_db 1.9 - [ -f $PACKAGES_REPOSITORY/cookorder.txt ] || touch $PACKAGES_REPOSITORY/cookorder.txt 1.10 1.11 # Check commons directories, create them if user is root. 1.12 if test $(id -u) = 0 ; then 1.13 @@ -130,14 +127,15 @@ 1.14 check_dir $SOURCES_REPOSITORY 1.15 check_dir $INCOMING_REPOSITORY 1.16 check_dir $LOCAL_REPOSITORY/log 1.17 + [ -f $dep_db ] || touch $dep_db 1.18 + [ -f $wan_db ] || touch $wan_db 1.19 + [ -f $PACKAGES_REPOSITORY/cookorder.txt ] || touch $PACKAGES_REPOSITORY/cookorder.txt 1.20 + for file in broken blocked commit incoming cooklist; do 1.21 + [ ! -f $PACKAGES_REPOSITORY/$file ] && touch $PACKAGES_REPOSITORY/$file 1.22 + done 1.23 + touch $SOURCES_REPOSITORY/sources.list 1.24 fi 1.25 1.26 - # Some files are needed by tazwok in PACKAGES_REPOSITORY. Create 1.27 - # them if they are missing. 1.28 - for file in broken blocked commit incoming cooklist; do 1.29 - [ ! -f $PACKAGES_REPOSITORY/$file ] && touch $PACKAGES_REPOSITORY/$file 1.30 - done 1.31 - touch $SOURCES_REPOSITORY/sources.list 1.32 1.33 # Limit memory usage. 1.34 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)