File: package-zip-source.sh

package info (click to toggle)
kshutdown 3.0~beta4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,528 kB
  • sloc: cpp: 4,353; sh: 291; makefile: 5
file content (61 lines) | stat: -rwxr-xr-x 966 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

if [ ! -f "./tools/make-version.sh" ]; then
	echo "Usage: ./tools/`basename $0`"
	exit 1
fi

# make version number

./tools/make-version.sh
KS_FILE_VERSION=`sed 1!d tools/VERSION`

# init variables

KS_DIR="kshutdown-$KS_FILE_VERSION"
KS_DIST_DIR="dist.tmp"
KS_ZIP="kshutdown-source-$KS_FILE_VERSION.zip"

# clean before copy

rm -f ./kshutdown
rm -f ./kshutdown-qt
rm -fR "$KS_DIR"
rm -fR "$KS_DIST_DIR"

pushd "src"
make clean
rm ./kshutdown
rm ./kshutdown-qt
rm ./Makefile
popd

# copy source files

mkdir "$KS_DIR"
cp * "$KS_DIR"

#mkdir "$KS_DIR/api"
#cp API.tmp/html/* "$KS_DIR/api"

cp -r "patches" "$KS_DIR"

rm -f po/*.po~
cp -r "po" "$KS_DIR"

cp -r ".kdev4" "$KS_DIR"
cp -r "src" "$KS_DIR"
cp -r "tools" "$KS_DIR"

# zip and checksum

mkdir "$KS_DIST_DIR"
zip -r9 "$KS_DIST_DIR/$KS_ZIP" "$KS_DIR" -x "*~" -x "*/.svn/*"
pushd "$KS_DIST_DIR"
sha1sum "$KS_ZIP">SHA1SUM
popd
rm -fR "$KS_DIR"

echo
echo "HINT: See \"dist.tmp\" directory..."
echo