use struct timeval to obtain the cputime. disable display atm until the code is corre...
[AROS.git] / scripts / snapshotports.sh
blobf78a7f8437b60a4111dcc96b1be611a6be39540e
1 #!/bin/bash
3 # Copyright © 2015, The AROS Development Team. All rights reserved.
4 # $Id$
6 # This script simplifies the task of creating snapshots of the ports.
9 set -e
10 set -u
12 date=`date +"%Y%m%d"`
14 root="$HOME/aros-snapshot-ports"
15 srcdir="$root/src"
16 arcdir="$root/archive/snapshots2/$date/Binaries"
17 portsdir="$HOME/aros-ports-src"
18 user="marust"
20 copy()
22 local target="$1" # e.g. "pc-i386"
23 local reldir="$2" # e.g. "Extras/Utilities/Text
24 local pack="$3" # e.g. "Annotate"
25 local from="$root/build/$target/bin/$target/AROS/$reldir/$pack"
26 local to="$root/bin/AROS-$date-$target-ports/$reldir"
28 if [ -d "$from" ] ; then
29 echo "Copying '$from' to '$to'"
30 mkdir -p "$to"
31 cp -r "$from" "$to"
32 cp -r "$from.info" "$to"
33 else
34 echo "'$from' doesn't exist"
38 build()
40 local target="$1" # e.g. "pc-i386"
41 local builddir="$root/build/$target"
42 local arcname="AROS-$date-$target-ports"
43 local bindir="$root/bin/$arcname"
45 echo "Building $target in $builddir"
46 rm "$builddir" -rf
47 mkdir "$builddir" -p
48 cd "$builddir"
49 "$srcdir/configure" --target="$target" --with-portssources="$portsdir"
50 make -s -j3
51 make -s -j3 ports
53 echo "Copying the binaries"
54 mkdir "$bindir" -p
56 copy "$target" "Extras/MultiMedia/Audio" "Abcm2ps"
57 copy "$target" "Extras/Development" "BWBasic"
58 copy "$target" "Extras/Development" "CBMBasic"
59 copy "$target" "Extras/Development" "CFlow"
60 copy "$target" "Extras/Development" "Ctags"
61 copy "$target" "Extras/Emu" "DOSBox"
62 copy "$target" "Extras/Emu" "Scummvm"
63 copy "$target" "Extras/Emu" "Vice"
64 copy "$target" "Extras/Utilities/Filetool" "Zaphod"
65 copy "$target" "Extras/Games" "Abuse"
66 copy "$target" "Extras/Games" "Adv770"
67 copy "$target" "Extras/Games" "Biniax2"
68 copy "$target" "Extras/Games" "Blobwars"
69 copy "$target" "Extras/Games" "Bugsquish"
70 copy "$target" "Extras/Games" "CircusLinux"
71 copy "$target" "Extras/Games" "Defendguin"
72 copy "$target" "Extras/Games" "GemDropX"
73 copy "$target" "Extras/Games" "GnuRobbo"
74 copy "$target" "Extras/Games" "Hurrican"
75 copy "$target" "Extras/Games" "InterLogic"
76 copy "$target" "Extras/Games" "KoboDeluxe"
77 copy "$target" "Extras/Games" "Koules"
78 copy "$target" "Extras/Games" "LMarbles"
79 copy "$target" "Extras/Games" "LTris"
80 copy "$target" "Extras/Games" "MadBomber"
81 copy "$target" "Extras/Games" "Magnetic"
82 copy "$target" "Extras/Games" "MultiPuzzle"
83 copy "$target" "Extras/Games" "PenguinCommand"
84 copy "$target" "Extras/Games" "Pushover"
85 copy "$target" "Extras/Games" "SdlScavenger"
86 copy "$target" "Extras/Games" "Vectoroids"
87 copy "$target" "Extras/Games" "WormWars"
88 copy "$target" "Extras/Games" "Xpired"
89 copy "$target" "Extras/MultiMedia/Gfx" "GrafX2"
90 copy "$target" "Extras/MultiMedia/Gfx" "Lunapaint"
91 copy "$target" "Extras/MultiMedia/Gfx" "Potrace"
92 copy "$target" "Extras/MultiMedia/Gfx" "ZuneView"
93 copy "$target" "Extras/Office" "MUIbase"
94 copy "$target" "Extras/Utilities/Print" "A2ps"
95 copy "$target" "Extras/Utilities/Scientific" "Mathomatic"
96 copy "$target" "Extras/Utilities/Scientific" "MathX"
97 copy "$target" "Extras/Utilities/Text" "Annotate"
98 copy "$target" "Extras/Utilities/Text" "Antiword"
99 copy "$target" "Extras/Utilities/Text" "Gocr"
100 copy "$target" "Extras/Utilities/Text" "PolyglotMan"
101 copy "$target" "Extras/MultiMedia/Video" "ScreenRecorder"
103 echo "Creating the archive $arcdir/$arcname.tar.bz2"
104 mkdir -p "$arcdir"
105 cd "$bindir"
106 tar cfvj "$arcdir/$arcname.tar.bz2" .
107 echo "Creating $arcdir/$arcname.tar.bz2.md5"
108 cd $arcdir
109 md5sum "$arcname.tar.bz2" > "$arcname.tar.bz2.md5"
113 if [ $# -eq 1 ] && [ "$1" == "-i" ] ; then
114 rm "$root" -rf
115 mkdir "$root"
116 mkdir "$srcdir"
117 svn checkout https://svn.aros.org/svn/aros/trunk/AROS "$srcdir"
118 svn checkout https://svn.aros.org/svn/aros/trunk/contrib "$srcdir/contrib"
119 svn checkout https://svn.aros.org/svn/aros/trunk/ports "$srcdir/ports"
120 exit 0
123 if [ $# -eq 1 ] && [ "$1" == "-b" ] ; then
124 echo "Updating the sources"
125 svn up "$srcdir" "$srcdir/contrib" "$srcdir/ports"
127 # for some reason I can't build the pc variant ATM -- mazze
128 #build pc-i386
129 #build pc-i386
130 build linux-i386
131 build linux-x86_64
132 build amiga-m68k
133 build raspi-armhf
134 exit 0
137 if [ $# -eq 1 ] && [ "$1" == "-u" ] ; then
138 echo "Uploading archives"
139 scp -r "$root/archive/snapshots2" "$user@frs.sourceforge.net:userweb/htdocs/uploads"
140 exit 1
143 echo "Usage:"
144 echo "snapshotports -i : create directories and do checkout of source"
145 echo "snapshotports -b : build AROS and create the archives"
146 echo "snapshotports -u : upload of archives to sourceforge"
148 exit 0