Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/helpers/build-snapshot
blob: 339cebf03f41490a1174d238bdcf12cc2091e7dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh

commandsdir=`dirname "$0"`
basedir=`dirname "$commandsdir"`

if [ "$#" -eq 0 ]; then
    echo "build-snapshot [destination directory]"
    exit 1
fi

destdir=$1
filename=sugar-build-`date +%Y%m%d-%H%M%S.tar`

ln -s `pwd` $destdir/sugar-build

cd $destdir

tar chf $filename \
    sugar-build/config \
    sugar-build/devbot \
    sugar-build/install \
    sugar-build/commands/helpers/bashrc \
    sugar-build/commands/helpers/find-free-display \
    sugar-build/commands/helpers/list-outputs \
    sugar-build/commands/helpers/ubuntu-tweaks \
    sugar-build/commands/helpers/xinitrc \
    sugar-build/commands/helpers/xephyr-window \
    sugar-build/commands/helpers/get-screen-dpi \
    sugar-build/commands/helpers/run-with-keyring \
    sugar-build/commands/check-system \
    sugar-build/commands/run-command \
    sugar-build/commands/common.py \
    sugar-build/commands/run \
    sugar-build/commands/shell

rm sugar-build

mkdir sugar-build

runsugarscript=sugar-build/run-sugar.sh

cat > $runsugarscript << "EOF"
#!/bin/sh

commands/check-system
commands/run
EOF

chmod +x $runsugarscript

runshellscript=sugar-build/run-shell.sh

cat > $runshellscript << "EOF"
#!/bin/sh

commands/check-system
commands/shell
EOF

chmod +x $runshellscript

tar rh -f $filename $runshellscript $runsugarscript

rm -rf sugar-build

xz $filename

echo $filename.xz