Finally activate the skeleton of the ARexx port
[AROS.git] / scripts / snapshotports.sh
blob32e0d7bb2b74673ed33b6bc1901aac94ad90be67
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/MultiMedia/Audio" "Abcm2ps"
59 copy "$target" "Extras/Development" "BWBasic"
60 copy "$target" "Extras/Development" "CBMBasic"
61 copy "$target" "Extras/Development" "CFlow"
62 copy "$target" "Extras/Development" "Ctags"
63 copy "$target" "Extras/Emu" "DOSBox"
64 copy "$target" "Extras/Emu" "Scummvm"
65 copy "$target" "Extras/Emu" "Vice"
66 copy "$target" "Extras/Utilities/Filetool" "Zaphod"
67 copy "$target" "Extras/Games" "Abuse"
68 copy "$target" "Extras/Games" "Adv770"
69 copy "$target" "Extras/Games" "Biniax2"
70 copy "$target" "Extras/Games" "Blobwars"
71 copy "$target" "Extras/Games" "Bugsquish"
72 copy "$target" "Extras/Games" "CircusLinux"
73 copy "$target" "Extras/Games" "Defendguin"
74 copy "$target" "Extras/Games" "GemDropX"
75 copy "$target" "Extras/Games" "GnuRobbo"
76 copy "$target" "Extras/Games" "Hurrican"
77 copy "$target" "Extras/Games" "InterLogic"
78 copy "$target" "Extras/Games" "KoboDeluxe"
79 copy "$target" "Extras/Games" "Koules"
80 copy "$target" "Extras/Games" "LMarbles"
81 copy "$target" "Extras/Games" "LTris"
82 copy "$target" "Extras/Games" "MadBomber"
83 copy "$target" "Extras/Games" "Magnetic"
84 copy "$target" "Extras/Games" "MultiPuzzle"
85 copy "$target" "Extras/Games" "PenguinCommand"
86 copy "$target" "Extras/Games" "Pushover"
87 copy "$target" "Extras/Games" "SdlScavenger"
88 copy "$target" "Extras/Games" "Vectoroids"
89 copy "$target" "Extras/Games" "WormWars"
90 copy "$target" "Extras/Games" "Xpired"
91 copy "$target" "Extras/MultiMedia/Gfx" "GrafX2"
92 copy "$target" "Extras/MultiMedia/Gfx" "Lunapaint"
93 copy "$target" "Extras/MultiMedia/Gfx" "Potrace"
94 copy "$target" "Extras/MultiMedia/Gfx" "ZuneView"
95 copy "$target" "Extras/Office" "MUIbase"
96 copy "$target" "Extras/Utilities/Archive" "ZuneARC"
97 copy "$target" "Extras/Utilities/Print" "A2ps"
98 copy "$target" "Extras/Utilities/Scientific" "Mathomatic"
99 copy "$target" "Extras/Utilities/Scientific" "MathX"
100 copy "$target" "Extras/Utilities/Text" "Annotate"
101 copy "$target" "Extras/Utilities/Text" "Antiword"
102 copy "$target" "Extras/Utilities/Text" "Gocr"
103 copy "$target" "Extras/Utilities/Text" "PolyglotMan"
104 copy "$target" "Extras/Utilities/Text" "Vim"
105 copy "$target" "Extras/MultiMedia/Video" "ScreenRecorder"
107 echo "Creating the archive $arcdir/$arcname.tar.bz2"
108 mkdir -p "$arcdir"
109 cd "$bindir"
110 tar cfvj "$arcdir/$arcname.tar.bz2" .
111 echo "Creating $arcdir/$arcname.tar.bz2.md5"
112 cd $arcdir
113 md5sum "$arcname.tar.bz2" > "$arcname.tar.bz2.md5"
117 if [ $# -eq 1 ] && [ "$1" == "-i" ] ; then
118 rm "$root" -rf
119 mkdir "$root"
120 mkdir "$srcdir"
121 svn checkout https://svn.aros.org/svn/aros/trunk/AROS "$srcdir"
122 svn checkout https://svn.aros.org/svn/aros/trunk/contrib "$srcdir/contrib"
123 svn checkout https://svn.aros.org/svn/aros/trunk/ports "$srcdir/ports"
124 exit 0
127 if [ $# -eq 1 ] && [ "$1" == "-b" ] ; then
128 echo "Update the sources"
129 svn up "$srcdir" "$srcdir/contrib" "$srcdir/ports"
131 build pc-i386
132 #build pc-x86_64
133 build amiga-m68k
134 #build raspi-armhf
135 exit 0
138 if [ $# -eq 1 ] && [ "$1" == "-u" ] ; then
139 echo "Uploading archives"
140 scp -r "$root/archive/snapshots2" "$user,aros@web.sourceforge.net:/home/project-web/aros/uploads"
141 exit 0
144 echo "Usage:"
145 echo "snapshotports -i : create directories and do checkout of source"
146 echo "snapshotports -b : build AROS and create the archives"
147 echo "snapshotports -u : upload of archives to sourceforge"
149 exit 0