tazwok view update-repository @ rev 269

Remove tab thats not need in set_pkg_path.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Feb 13 20:20:46 2011 +0000 (2011-02-13)
parents
children 91fd51513c01
line source
1 #!/bin/sh
3 if ! [ "$1" ]; then
4 echo "Usage: update-repository LOCAL_REPOSITORY (i.e.: /home/slitaz/experimental)"
5 exit
6 fi
8 WOK=$1/wok
9 SOURCES_REPOSITORY=$1/src
10 LOG_DIR=$1/log
12 if [ -d "$WOK" ] && [ -d "$SOURCES_REPOSITORY" ] && [ -d "$LOG_DIR" ]; then
13 rm -f $SOURCES_REPOSITORY/sources.list
14 else
15 echo "$1 doesn't looks like a LOCAL_REPOSITORY: it doesn't contains one or several of theses directories:
16 * $WOK
17 * $SOURCES_REPOSITORY
18 * $LOG_DIR"
19 exit
20 fi
22 echo "Updating logs files..."
23 cd $LOG_DIR
24 for i in *.html; do
25 sed 's~file:///usr/share/slitaz/web~web~' -i $i
26 done
27 [ -L web ] || ln -s /usr/share/slitaz/web web
28 echo "Update done: you can now use 'tazwok webserver on' to add you're repository to webinterface.
29 If you use the path by default, it will be available at: http://localhost/vhosts/bb
30 This command need lighttpd & php installed to be used."
32 echo "
33 Changing sources pathes according new changes into tazwok-experimental and generating $SOURCES_REPOSITORY/sources.list."
34 cd $WOK
35 for i in *; do
36 unset PACKAGE SOURCE VERSION WGET_URL TARBALL
37 source $i/receipt
38 [ "$WGET_URL" ] || continue
39 # Check that source is at the good location; if not move it or remove it if it's a duplicate.
40 if [ "$SOURCE" ]; then
41 if [ -f "$SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma" ]; then
42 if [ -f "$SOURCES_REPOSITORY/$SOURCE-$VERSION.tar.lzma" ]; then
43 rm $SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma
44 else
45 mv $SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma $SOURCES_REPOSITORY/$SOURCE-$VERSION.tar.lzma
46 fi
47 fi
48 fi
49 if [ -f $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma ]; then
50 echo -e "$PACKAGE:incoming\t${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" >> $SOURCES_REPOSITORY/sources.list
51 elif [ -f "SOURCES_REPOSITORY/$TARBALL" ]; then
52 echo -e "$PACKAGE:incoming\t$TARBALL" >> $SOURCES_REPOSITORY/sources.list
53 fi
54 done
55 echo "Done."
56 echo "
57 You can check/purge old sources tarball and sources tarball unrelated to wok receipts using 'tazwok clean-src'"