slitaz-modular rev 115
local-mirror: Update local-mirror script. Added support for install incoming packages on desktop.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Jun 08 13:44:47 2011 +0000 (2011-06-08) |
parents | 2f513d33aeee |
children | 7b5a84926bf4 |
files | initramfs/usr/bin/local-mirror |
line diff
1.1 --- a/initramfs/usr/bin/local-mirror Wed Jun 01 09:17:31 2011 +0000 1.2 +++ b/initramfs/usr/bin/local-mirror Wed Jun 08 13:44:47 2011 +0000 1.3 @@ -28,6 +28,8 @@ 1.4 [ -d $SLITAZ_DIR/repos ] || ln -sf $REPOS_DIR $SLITAZ_DIR/repos 1.5 [ -d $SLITAZ_DIR/$version/packages ] || ln -sf $PKGDIR $SLITAZ_DIR/$version/packages 1.6 [ -d $SLITAZ_DIR/$version/src ] || ln -sf $SRCDIR $SLITAZ_DIR/$version/src 1.7 +[ -d $SLITAZ_DIR/src ] || ln -sf $SRCDIR $SLITAZ_DIR/src 1.8 +[ -d $SLITAZ_DIR/packages ] || ln -sf $PKGDIR $SLITAZ_DIR/packages 1.9 [ -d $SLITAZ_DIR/repos ] && REPOS_DIR="$SLITAZ_DIR/repos" 1.10 1.11 #repos folders for website 1.12 @@ -52,6 +54,7 @@ 1.13 [ -d $REPOS_DIR ] || continue 1.14 1.15 INCOMING_REPOSITORY="$COOKING/packages-incoming" 1.16 +INCOMING="$SLITAZ_DIR/$version/incoming" 1.17 CRON_FILE="/var/spool/cron/crontabs/root" 1.18 1.19 www() { 1.20 @@ -151,26 +154,33 @@ 1.21 echo -e "$MAIN_WWW_DIR/bb" | tazwok webserver on 1.22 ;; 1.23 cook) 1.24 - pwd=$(pwd) 1.25 - if [ -d $REPOS_DIR/my-cookutils ]; then 1.26 - cd $REPOS_DIR/my-cookutils 1.27 - if [ "$(hg branch)" != "testing" ]; then 1.28 - hg update testing 1.29 - fi 1.30 - make install 1.31 - cd $pwd 1.32 - fi 1.33 + #pwd=$(pwd) 1.34 + #if [ -d $REPOS_DIR/my-cookutils ]; then 1.35 + # cd $REPOS_DIR/my-cookutils 1.36 + # if [ "$(hg branch)" != "testing" ]; then 1.37 + # hg update testing 1.38 + # fi 1.39 + # make install 1.40 + # cd $pwd 1.41 + #fi 1.42 echo "$PKGDIR" > $LOCALSTATE/mirror 1.43 - [ -d /var/www/cgi-bin/cooker ] && cp -a /var/www/cgi-bin/cooker $MAIN_WWW_DIR/cook 1.44 + [ -d $LOCALSTATE/undigest/incoming ] || mkdir -p $LOCALSTATE/undigest/incoming 1.45 + [ -f $LOCALSTATE/undigest/incoming/mirror ] || echo "$INCOMING" > $LOCALSTATE/undigest/incoming/mirror 1.46 + [ -d $SLITAZ_DIR/$version/incoming ] || mkdir -p $SLITAZ_DIR/$version/incoming 1.47 + [ -d /var/www/cooker ] && cp -a /var/www/cooker $MAIN_WWW_DIR/cook 1.48 + [ -f /usr/share/cook/header.html ] && cp -a /usr/share/cook/header.html $MAIN_WWW_DIR/cook/header.html 1.49 if [ "$MKCHROOT" = "yes" ]; then 1.50 tazdev gen-chroot $version 1.51 [ -d $SLITAZ_DIR/$version/chroot ] && mkdir -p $SLITAZ_DIR/$version/chroot$(dirname $CRON_FILE) 1.52 - [ -d $SLITAZ_DIR/$version/chroot ] && echo "* */2 * * * /usr/bin/cooker" > $SLITAZ_DIR/$version/chroot${CRON_FILE} 1.53 + [ -d $SLITAZ_DIR/$version/chroot ] && echo "0 */2 * * * /usr/bin/cooker" > $SLITAZ_DIR/$version/chroot${CRON_FILE} 1.54 [ -d $SLITAZ_DIR/$version/chroot ] && echo "$SLITAZ_DIR/$version/packages" > $SLITAZ_DIR/$version/chroot${LOCALSTATE}/mirror 1.55 + mkdir -p $SLITAZ_DIR/$version/chroot${LOCALSTATE}/undigest/incoming 1.56 + echo "$SLITAZ_DIR/$version/incoming" > $SLITAZ_DIR/$version/chroot${LOCALSTATE}/undigest/incoming/mirror 1.57 fi 1.58 [ -d $REPOS_DIR/wok-tank ] && ln -sf $REPOS_DIR/wok-tank $SLITAZ_DIR/$version/wok-hg 1.59 #[ -d $REPOS_DIR/wok-tank ] && ln -sf $REPOS_DIR/wok-tank $SLITAZ_DIR/$version/wok 1.60 - [ -d $PKGDIR ] && ln -sf $PKGDIR $SLITAZ_DIR/$version/packages 1.61 + [ -d $MAIN_WWW_DIR/cook/packages ] || ln -sf $SLITAZ_DIR/$version/packages $MAIN_WWW_DIR/cook/packages 1.62 + [ -d $MAIN_WWW_DIR/cook/incoming ] || ln -sf $SLITAZ_DIR/$version/incoming $MAIN_WWW_DIR/cook/incoming 1.63 ;; 1.64 pkgs) 1.65 [ -d $MAIN_WWW_DIR/pkgs ] || mkdir -p $MAIN_WWW_DIR/pkgs 1.66 @@ -200,7 +210,7 @@ 1.67 [ -d $REPOS_DIR/slitaz-dev-tools/mirror-tools/mirror-info ] && cp -a $REPOS_DIR/slitaz-dev-tools/mirror-tools/mirror-info $MAIN_WWW_DIR 1.68 [ -d $REPOS_DIR/slitaz-dev-tools/mirror-tools/slitaz ] && cp -a $REPOS_DIR/slitaz-dev-tools/mirror-tools/slitaz $MAIN_WWW_DIR 1.69 [ -d $MAIN_WWW_DIR/slitaz/mirror/packages ] || mkdir -p $MAIN_WWW_DIR/slitaz/mirror/packages 1.70 - [ -d $PKGDIR ] && ln -sf $PKGDIR $MAIN_WWW_DIR/slitaz/mirror/packages/$(cat /etc/slitaz-release) 1.71 + [ -d $PKGDIR ] && ln -sf $PKGDIR $MAIN_WWW_DIR/slitaz/mirror/packages/$version 1.72 if [ -d $SRCDIR ]; then 1.73 for i in $(ls $SRCDIR); do 1.74 [ -d $MAIN_WWW_DIR/slitaz/mirror/sources/packages/${i:0:1} ] || mkdir -p $MAIN_WWW_DIR/slitaz/mirror/sources/packages/${i:0:1}