cookutils rev 457

cookiso: Using libcook.sh now. Make sure the cache variable is $CACHE/cookiso if $0 equals cookiso. Otherwise it equals $cACHE. Also SSH_CMD, SSH_ISO, and SSH_HOST can now be changed in cook.conf.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Jun 05 09:37:14 2012 +0000 (2012-06-05)
parents bb5160390733
children c952d28181e6
files cookiso lib/libcook.sh
line diff
     1.1 --- a/cookiso	Mon Jun 04 16:44:34 2012 +0000
     1.2 +++ b/cookiso	Tue Jun 05 09:37:14 2012 +0000
     1.3 @@ -5,25 +5,16 @@
     1.4  # can run on its own and automate official SliTaz ISO creation.
     1.5  #
     1.6  
     1.7 -[ -f "/etc/slitaz/cook.conf" ] && . /etc/slitaz/cook.conf
     1.8 -[ -f "cook.conf" ] && . ./cook.conf
     1.9 -
    1.10  # --> cook.conf
    1.11  # SSH/RSA configuration to upload on a server.
    1.12 +# Assign this before cook.conf so it can be
    1.13 +# reassign in cook.conf.
    1.14  SSH_CMD="dbclient -i /root/.ssh/id_rsa.dropbear"
    1.15  SSH_ISO="/var/www/slitaz/mirror/iso"
    1.16  SSH_HOST="slitaz@mirror.slitaz.org"
    1.17  #BWLIMIT="--bwlimit=40"
    1.18  
    1.19 -# Cookiso DB files.
    1.20 -cache="$CACHE/cookiso"
    1.21 -repo="$SLITAZ/flavors"
    1.22 -iso="$SLITAZ/iso"
    1.23 -activity="$cache/activity"
    1.24 -command="$cache/command"
    1.25 -rollog="$cache/rolling.log"
    1.26 -synclog="$cache/rsync.log"
    1.27 -commits="$cache/commits"
    1.28 +. /usr/lib/slitaz/libcook.sh
    1.29  
    1.30  # Parse cmdline options.
    1.31  for opt in "$@"
     2.1 --- a/lib/libcook.sh	Mon Jun 04 16:44:34 2012 +0000
     2.2 +++ b/lib/libcook.sh	Tue Jun 05 09:37:14 2012 +0000
     2.3 @@ -16,15 +16,26 @@
     2.4  
     2.5  # Shared DB between Cook, the Cooker and Cookiso.
     2.6  # In cookiso: repo= --> flavors
     2.7 +if [ "$(basename $0)" = "cookiso" ]; then
     2.8 +	cache="$CACHE/cookiso"
     2.9 +	#cookiso variables
    2.10 +	repo="$SLITAZ/flavors"
    2.11 +	iso="$SLITAZ/iso"
    2.12 +	rollog="$cache/rolling.log"
    2.13 +	synclog="$cache/rsync.log"
    2.14 +else
    2.15 +	cache="$CACHE"
    2.16 +fi
    2.17 +
    2.18  flavors="$SLITAZ/flavors"
    2.19 -activity="$CACHE/activity"
    2.20 -commits="$CACHE/commits"
    2.21 -cooklist="$CACHE/cooklist"
    2.22 -cookorder="$CACHE/cookorder"
    2.23 -command="$CACHE/command"
    2.24 -blocked="$CACHE/blocked"
    2.25 -broken="$CACHE/broken"
    2.26 -cooknotes="$CACHE/cooknotes"
    2.27 +activity="$cache/activity"
    2.28 +commits="$cache/commits"
    2.29 +cooklist="$cache/cooklist"
    2.30 +cookorder="$cache/cookorder"
    2.31 +command="$cache/command"
    2.32 +blocked="$cache/blocked"
    2.33 +broken="$cache/broken"
    2.34 +cooknotes="$cache/cooknotes"
    2.35  crontabs="/var/spool/cron/crontabs/root"
    2.36  
    2.37  # Lograte activity.