try to make sure compiler/include/mmakefile is always refreshed correctly.
[AROS.git] / scripts / snapshotports.sh
blob30a318277f3e6b60034c67c92e345292daf4196e
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 # TODO: copy package variables
55 echo "Copying the binaries"
56 mkdir "$bindir" -p
58 copy "$target" "Extras/Developer" "BWBasic"
59 copy "$target" "Extras/Developer" "CBMBasic"
60 copy "$target" "Extras/Developer" "CFlow"
61 copy "$target" "Extras/Developer" "Ctags"
62 copy "$target" "Extras/Emu" "DOSBox"
63 copy "$target" "Extras/Emu" "Scummvm"
64 copy "$target" "Extras/Emu" "Vbam"
65 copy "$target" "Extras/Emu" "Vice"
66 copy "$target" "Extras/Games/Platform" "Abuse"
67 copy "$target" "Extras/Games/Action" "Biniax2"
68 copy "$target" "Extras/Games/Platform" "Blobwars"
69 copy "$target" "Extras/Games/Action" "Bugsquish"
70 copy "$target" "Extras/Games/Action" "CircusLinux"
71 copy "$target" "Extras/Games/Action" "Defendguin"
72 copy "$target" "Extras/Games/Puzzle" "GemDropX"
73 copy "$target" "Extras/Games/Action" "GnuRobbo"
74 copy "$target" "Extras/Games/Platform" "Hurrican"
75 copy "$target" "Extras/Games/Puzzle" "InterLogic"
76 copy "$target" "Extras/Games/Action" "KoboDeluxe"
77 copy "$target" "Extras/Games/Action" "Koules"
78 copy "$target" "Extras/Games/Puzzle" "LMarbles"
79 copy "$target" "Extras/Games/Puzzle" "LTris"
80 copy "$target" "Extras/Games/Action" "MadBomber"
81 copy "$target" "Extras/Games/Adventure" "Magnetic"
82 copy "$target" "Extras/Games/Puzzle" "MultiPuzzle"
83 copy "$target" "Extras/Games/Action" "PenguinCommand"
84 copy "$target" "Extras/Games/Puzzle" "Pushover"
85 copy "$target" "Extras/Games/Action" "Rocksndiamonds"
86 copy "$target" "Extras/Games/Action" "SdlScavenger"
87 copy "$target" "Extras/Games/Action" "Vectoroids"
88 copy "$target" "Extras/Games/Action" "WormWars"
89 copy "$target" "Extras/Games/Action" "Xpired"
90 copy "$target" "Extras/MultiMedia/Audio" "Abcm2ps"
91 copy "$target" "Extras/MultiMedia/Audio" "MilkyTracker"
92 copy "$target" "Extras/MultiMedia/Gfx" "GrafX2"
93 copy "$target" "Extras/MultiMedia/Gfx" "Lodepaint"
94 copy "$target" "Extras/MultiMedia/Gfx" "Potrace"
95 copy "$target" "Extras/MultiMedia/Gfx" "ZuneView"
96 copy "$target" "Extras/MultiMedia/Video" "ScreenRecorder"
97 copy "$target" "Extras/Office" "MUIbase"
98 copy "$target" "Extras/Utilities/Archive" "ZuneARC"
99 copy "$target" "Extras/Utilities/Filetool" "Zaphod"
100 copy "$target" "Extras/Utilities/Print" "A2ps"
101 copy "$target" "Extras/Utilities/Scientific" "Mathomatic"
102 copy "$target" "Extras/Utilities/Scientific" "MathX"
103 copy "$target" "Extras/Utilities/Text" "Annotate"
104 copy "$target" "Extras/Utilities/Text" "Antiword"
105 copy "$target" "Extras/Utilities/Text" "Gocr"
106 copy "$target" "Extras/Utilities/Text" "PolyglotMan"
107 copy "$target" "Extras/Utilities/Text" "Vim"
109 echo "Creating the archive $arcdir/$arcname.tar.bz2"
110 mkdir -p "$arcdir"
111 cd "$bindir"
112 tar cfvj "$arcdir/$arcname.tar.bz2" .
113 echo "Creating $arcdir/$arcname.tar.bz2.md5"
114 cd $arcdir
115 md5sum "$arcname.tar.bz2" > "$arcname.tar.bz2.md5"
119 if [ $# -eq 1 ] && [ "$1" == "-i" ] ; then
120 rm "$root" -rf
121 mkdir "$root"
122 mkdir "$srcdir"
123 svn checkout https://svn.aros.org/svn/aros/trunk/AROS "$srcdir"
124 svn checkout https://svn.aros.org/svn/aros/trunk/contrib "$srcdir/contrib"
125 svn checkout https://svn.aros.org/svn/aros/trunk/ports "$srcdir/ports"
126 exit 0
129 if [ $# -eq 1 ] && [ "$1" == "-b" ] ; then
130 echo "Update the sources"
131 svn up "$srcdir" "$srcdir/contrib" "$srcdir/ports"
133 build pc-i386
134 #build pc-x86_64
135 #build amiga-m68k
136 #build raspi-armhf
137 exit 0
140 if [ $# -eq 1 ] && [ "$1" == "-u" ] ; then
141 echo "Uploading archives"
142 scp -r "$root/archive/snapshots2" "$user,aros@web.sourceforge.net:/home/project-web/aros/uploads"
143 exit 0
146 echo "Usage:"
147 echo "snapshotports -i : create directories and do checkout of source"
148 echo "snapshotports -b : build AROS and create the archives"
149 echo "snapshotports -u : upload of archives to sourceforge"
151 exit 0