forked from rb1205/BitSafe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease
More file actions
executable file
·45 lines (38 loc) · 839 Bytes
/
Copy pathrelease
File metadata and controls
executable file
·45 lines (38 loc) · 839 Bytes
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
#!/bin/bash
OUTPUT_DIR=~/Dropbox/Public
#OUTPUT_DIR=/tmp
if [ -z "$1" ]; then
echo "usage: release <version>"
exit 1
fi
function processfile {
gpg -bs $1 || return $?
md5sum $1 >$1.md5 || return $?
cp $1 $1.sig $1.md5 $TODIR
rm $1.sig $1.md5
return $?
}
function exiterr {
echo "error, exiting."
exit 1
}
if [ ! -d $OUTPUT_DIR ]; then
echo "no output directory"
exit 1
fi
if [ ! -e binary.img ] || [ ! -e binary/live/filesystem.squashfs ]; then
echo "missing binary.img or filesystem.squashfs"
exit 1
fi
TODIR=$OUTPUT_DIR/$1
test -d $TODIR || mkdir -p $TODIR
if [ ! -d $TODIR ]; then
echo "no output directory"
exit 1
fi
processfile binary.img || exiterr
cd binary || exiterr
tar -xf ../live.tar.gz live || exiterr
cd ..
processfile live.tar.gz || exiterr
rm live.tar.gz || exiterr