Uh oh!
There was an error while loading. Please reload this page.
forked from bankonme/BitSafe
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease
More file actions
Latest commit
executable file
·58 lines (46 loc) · 1.04 KB
/
Copy pathrelease
File metadata and controls
executable file
·58 lines (46 loc) · 1.04 KB
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
#!/bin/bash
OUTPUT_DIR=~/Dropbox/Public
DIST_NAME=BitSafe
if [ -z"$1" ];then
echo"usage: release <version>"
exit 1
fi
functionprocessfile {
gpg -bs $1||return$?
cp $1$TODIR
mv $1.sig $TODIR
return$?
}
functionexiterr {
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
BINARY_FILE=$DIST_NAME\_V$1\_image.img
UPDATE_FILE=$DIST_NAME\_V$1\_update.zip
ln -s binary.img "$BINARY_FILE"|| exiterr
processfile "$BINARY_FILE"|| exiterr
rm "$BINARY_FILE"
cd binary || exiterr
#tar -czf ../live.tar.gz live || exiterr
zip -r ../"$UPDATE_FILE" live || exiterr
cd ..
processfile "$UPDATE_FILE"|| exiterr
rm "$UPDATE_FILE"|| exiterr
echo""
echo"Calculating MD5 hash..."
cd$TODIR
md5sum "$BINARY_FILE""$UPDATE_FILE"