-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-tarball
executable file
·76 lines (61 loc) · 2.17 KB
/
build-tarball
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
69
70
71
72
73
74
75
#!/bin/bash
# Usage : ./build-tarball <version>
# e.g.: ./build-tarball 0.0.2
#*
#* The MIT License
#*
#* Copyright 2012 Georgios Migdos <[email protected]>.
#*
#* Permission is hereby granted, free of charge, to any person obtaining a copy
#* of this software and associated documentation files (the "Software"), to deal
#* in the Software without restriction, including without limitation the rights
#* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#* copies of the Software, and to permit persons to whom the Software is
#* furnished to do so, subject to the following conditions:
#*
#* The above copyright notice and this permission notice shall be included in
#* all copies or substantial portions of the Software.
#*
#* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#* THE SOFTWARE.
#*
TARGET_DIR="lingua-$1"
if [ -d binaries/$TARGET_DIR ]
then
rm -rf binaries/$TARGET_DIR
fi
mkdir -p binaries/$TARGET_DIR
cp -R help binaries/$TARGET_DIR
cp -R misc binaries/$TARGET_DIR
cp -R nbproject binaries/$TARGET_DIR
cp -R sourceview-files binaries/$TARGET_DIR
cp -R src binaries/$TARGET_DIR
cp AUTHORS binaries/$TARGET_DIR/AUTHORS
cp build.xml binaries/$TARGET_DIR/build.xml
cp build-tarball binaries/$TARGET_DIR/build-tarball
cp COPYING binaries/$TARGET_DIR/COPYING
cp Makefile binaries/$TARGET_DIR/Makefile
cp manifest.mf binaries/$TARGET_DIR/manifest.mf
cp manifest-libs binaries/$TARGET_DIR/manifest-libs
cp README.md binaries/$TARGET_DIR/README.md
cd binaries
if [ -f lingua-$1-src.tar.gz ]
then
rm -f lingua-$1-src.tar.gz
fi
tar -cvzf lingua-$1.tar.gz $TARGET_DIR
rm -rf $TARGET_DIR
if [ $# -gt 0 ]
then
if [ -f lingua-src.tgz ]
then
rm -f lingua-src.tgz
fi
cp lingua-$1.tar.gz lingua-src.tar.gz
fi
cd ../