# HG changeset patch # User Christopher Rogers # Date 1338889034 0 # Node ID b7fc4308e7b44ddf6df961349e9875f318e3609e # Parent bb5160390733f6891d8f1a180a2845e52eedd03c 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. diff -r bb5160390733 -r b7fc4308e7b4 cookiso --- a/cookiso Mon Jun 04 16:44:34 2012 +0000 +++ b/cookiso Tue Jun 05 09:37:14 2012 +0000 @@ -5,25 +5,16 @@ # can run on its own and automate official SliTaz ISO creation. # -[ -f "/etc/slitaz/cook.conf" ] && . /etc/slitaz/cook.conf -[ -f "cook.conf" ] && . ./cook.conf - # --> cook.conf # SSH/RSA configuration to upload on a server. +# Assign this before cook.conf so it can be +# reassign in cook.conf. SSH_CMD="dbclient -i /root/.ssh/id_rsa.dropbear" SSH_ISO="/var/www/slitaz/mirror/iso" SSH_HOST="slitaz@mirror.slitaz.org" #BWLIMIT="--bwlimit=40" -# Cookiso DB files. -cache="$CACHE/cookiso" -repo="$SLITAZ/flavors" -iso="$SLITAZ/iso" -activity="$cache/activity" -command="$cache/command" -rollog="$cache/rolling.log" -synclog="$cache/rsync.log" -commits="$cache/commits" +. /usr/lib/slitaz/libcook.sh # Parse cmdline options. for opt in "$@" diff -r bb5160390733 -r b7fc4308e7b4 lib/libcook.sh --- a/lib/libcook.sh Mon Jun 04 16:44:34 2012 +0000 +++ b/lib/libcook.sh Tue Jun 05 09:37:14 2012 +0000 @@ -16,15 +16,26 @@ # Shared DB between Cook, the Cooker and Cookiso. # In cookiso: repo= --> flavors +if [ "$(basename $0)" = "cookiso" ]; then + cache="$CACHE/cookiso" + #cookiso variables + repo="$SLITAZ/flavors" + iso="$SLITAZ/iso" + rollog="$cache/rolling.log" + synclog="$cache/rsync.log" +else + cache="$CACHE" +fi + flavors="$SLITAZ/flavors" -activity="$CACHE/activity" -commits="$CACHE/commits" -cooklist="$CACHE/cooklist" -cookorder="$CACHE/cookorder" -command="$CACHE/command" -blocked="$CACHE/blocked" -broken="$CACHE/broken" -cooknotes="$CACHE/cooknotes" +activity="$cache/activity" +commits="$cache/commits" +cooklist="$cache/cooklist" +cookorder="$cache/cookorder" +command="$cache/command" +blocked="$cache/blocked" +broken="$cache/broken" +cooknotes="$cache/cooknotes" crontabs="/var/spool/cron/crontabs/root" # Lograte activity.