Mercurial > hg > aboriginal
comparison sources/more/cronjob.sh @ 852:6ecee01bffa6
Update paths and comments in cronjob.sh, rename "none" to "stable", minor cleanup to logging.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 15 Oct 2009 21:25:30 -0500 |
parents | b1ab9e87aff5 |
children | 330442bbed6e |
comparison
equal
deleted
inserted
replaced
851:b1ab9e87aff5 | 852:6ecee01bffa6 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 #export PREFERRED_MIRROR=http://impactlinux.com/fwl/mirror | 3 # This script is run by a nightly cron job to build snapshots using the current |
4 #FWL_STABLE=tip | 4 # build scripts from the repository. |
5 | |
6 # It builds a "stable" version of each architecture using stable version of all | |
7 # packages (according to the current ./download.sh), and then iterates through | |
8 # the packages listed in $PACKAGES grabbing a repository snapshot of each one | |
9 # and building each architecture again. Finally, it builds an "all" version | |
10 # using the unstable versions of every listed package simultaneously. | |
11 | |
12 # The cron job is run under a dedicated user, and invokes this script via the | |
13 # following code snippet: | |
14 | |
15 # cd firmware | |
16 # hg pull -u | |
17 # export PREFERRED_MIRROR=http://impactlinux.com/fwl/mirror | |
18 # export PACKAGES="busybox uClibc linux" | |
19 # sources/toys/nightly.sh >/dev/null 2>/dev/null </dev/null | |
20 # /rsync_to_server.sh | |
21 | |
22 # The dedicated user's home directory has ~/{firmware,busybox,uClibc,linux} | |
23 # directories at the top level, containing appropriate repositories. | |
24 # The firmware repository is updated externally (since you don't want to run | |
25 # a script out of a repository you're updating). The other three ones updated | |
26 # by this script. (It currently only understands git repositories, out of | |
27 # sheer laziness.) | |
28 # | |
29 # The ~/snapshot directory is used to store output, and then rsynced up to | |
30 # the server | |
31 | |
32 # This script calls sources/more/buildall.sh | |
5 | 33 |
6 TOP="$(pwd)" | 34 TOP="$(pwd)" |
7 SNAPSHOT_DATE=$(date +"%Y-%m-%d") | 35 SNAPSHOT_DATE=$(date +"%Y-%m-%d") |
8 | 36 |
9 TEMPDIR="$TOP" | 37 TEMPDIR="$TOP" |
11 rm -rf triage.* build | 39 rm -rf triage.* build |
12 | 40 |
13 # Update each package from repository, generate alt-tarball, and build with | 41 # Update each package from repository, generate alt-tarball, and build with |
14 # that package. | 42 # that package. |
15 | 43 |
16 for PACKAGE in none $PACKAGES all | 44 for PACKAGE in stable $PACKAGES all |
17 do | 45 do |
18 export USE_UNSTABLE="$PACKAGE" | 46 export USE_UNSTABLE="$PACKAGE" |
19 | 47 |
20 # Handle special package name "all" | 48 # Handle special package name "all" |
21 | 49 |
22 if [ "$PACKAGE" == "none" ] | 50 if [ "$PACKAGE" == "stable" ] |
23 then | 51 then |
24 USE_UNSTABLE= | 52 USE_UNSTABLE= |
25 elif [ "$PACKAGE" == "all" ] | 53 elif [ "$PACKAGE" == "all" ] |
26 then | 54 then |
27 [ -z "$PACKAGES" ] && continue | 55 [ -z "$PACKAGES" ] && continue |
40 | 68 |
41 # Build everything with unstable version of that package, and stable | 69 # Build everything with unstable version of that package, and stable |
42 # version of everything else (including build scripts). | 70 # version of everything else (including build scripts). |
43 | 71 |
44 cd "$TOP" | 72 cd "$TOP" |
45 FORK=1 nice -n 20 ./buildall.sh | 73 FORK=1 nice -n 20 sources/more/buildall.sh |
46 | 74 |
47 FORK=1 ./smoketest-all.sh --logs > build/logs/status.txt | 75 # Move results to output directory. |
48 | 76 |
49 DESTDIR="$TOP/../snapshots/$PACKAGE/$SNAPSHOT_DATE" | 77 DESTDIR="$TOP/../snapshots/$PACKAGE/$SNAPSHOT_DATE" |
50 rm -rf "$DESTDIR" | 78 rm -rf "$DESTDIR" |
51 mkdir -p "$DESTDIR" | 79 mkdir -p "$DESTDIR" |
52 mv build/logs build/*.tar.bz2 "$DESTDIR" | 80 mv build/logs build/*.tar.bz2 "$DESTDIR" |