slitaz-forge view mirror/mirror @ rev 333

mirror-search.sh: add bugs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 28 15:59:26 2012 +0200 (2012-09-28)
parents 2a85be732514
children c890b7f0723e
line source
1 #!/bin/sh
2 #
3 # Main SliTaz Mirror admin utility
4 #
5 # Copyright (C) 2012 SliTaz GNU/Linux - BSD License
6 #
7 # Authors : Christophe Lincoln <pankso@slitaz.org>
8 #
10 REPOS="/home/slitaz/repos"
11 WWW="/var/www"
12 MIRROR="$WWW/mirror"
13 INFO="$WWW/mirror-info"
14 TINY="$WWW/pizza/tiny"
15 BACKUPS="/home/backups"
17 usage() {
18 cat << EOT
20 Usage: $(basename $0) [command]
21 Commands:
22 up-info Update mirror.slitaz.org/info/ web interface
23 up-tiny Update tiny.slitaz.org/ web interface
24 up-mirror Update mirror.slitaz.org files
25 up-pkgs Update pkgs.slitaz.org
27 EOT
28 }
30 case "$1" in
31 up-info)
32 echo "Updating: mirror.slitaz.org/info..."
33 cd $REPOS/slitaz-forge && hg pull -u
34 echo "Copying info to: $INFO"
35 cp -a mirror/info/* $INFO ;;
36 up-tiny)
37 echo "Updating: tiny.slitaz.org..."
38 cd $REPOS/tiny-slitaz && hg pull -u
39 echo "Copying tiny to: $TINY"
40 cp -a * $TINY ;;
41 up-mirror)
42 echo "Updating: mirror.slitaz.org files..."
43 cd $REPOS/slitaz-forge && hg pull -u
44 echo "Copying root to: $MIRROR"
45 cp -a mirror/root/* $MIRROR ;;
46 up-pkgs)
47 echo "Updating: pkgs.slitaz.org..."
48 cd $REPOS/slitaz-forge && hg pull -u
49 echo "Copying pkgs to: $WWW/pkgs"
50 cp -a pkgs/*.* $WWW/pkgs
51 cp -a pkgs/lib $WWW/pkgs
52 cd pkgs && make install-msg ;;
53 *)
54 usage ;;
55 esac
56 exit 0