blob: 1dbf2eb02e8121e6601ebc3dc856c2e98e0a2d78 (
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
|
#!/bin/sh
commandsdir=`dirname "$0"`
basedir=`dirname "$commandsdir"`
if [ "$#" -eq 0 ]; then
echo "build-snapshot [destination directory]"
exit 1
fi
destdir=`dirname $1`
filename=`basename $1`
rootdir=sugar-snapshot
mkdir -p $destdir
ln -s `pwd` $destdir/$rootdir
cd $destdir
tar chf $filename \
$rootdir/config \
$rootdir/devbot \
$rootdir/install \
$rootdir/commands/helpers/bashrc \
$rootdir/commands/helpers/find-free-display \
$rootdir/commands/helpers/list-outputs \
$rootdir/commands/helpers/ubuntu-tweaks \
$rootdir/commands/helpers/xinitrc \
$rootdir/commands/helpers/xephyr-window \
$rootdir/commands/helpers/get-screen-dpi \
$rootdir/commands/helpers/run-with-keyring \
$rootdir/commands/check-system \
$rootdir/commands/run-command \
$rootdir/commands/common.py \
$rootdir/commands/run \
$rootdir/commands/shell
rm $rootdir
mkdir $rootdir
runsugarscript=$rootdir/run-sugar.sh
cat > $runsugarscript << "EOF"
#!/bin/sh
commands/run
EOF
chmod +x $runsugarscript
runshellscript=$rootdir/run-shell.sh
cat > $runshellscript << "EOF"
#!/bin/sh
commands/shell
EOF
chmod +x $runshellscript
tar rh -f $filename $runshellscript $runsugarscript
rm -rf $rootdir
xz $filename
|