-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathcreate_src_tarball
More file actions
executable file
·34 lines (27 loc) · 918 Bytes
/
create_src_tarball
File metadata and controls
executable file
·34 lines (27 loc) · 918 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
#!/bin/sh
. ./VERSION
DISTRIB=../staff_tmp$(printf %x $(date +%s))/
REVISION=$(LANG=en svn info --non-interactive 2>&- | grep 'Revision: ' | cut -d' ' -f2)
TARBALLNAME=../staff-src-${PACKAGE_VERSION}-r${REVISION}
test $(svn st --non-interactive | grep -vE '^\? ' | wc -l) -eq 0 || \
/bin/echo -e "\e[1mWARNING: working copy has local changes\e[0m"
echo "creating tarball..."
rm -Rf ${DISTRIB}
mkdir -p ${DISTRIB}staff/
cp -Rf . ${DISTRIB}staff/
cd ${DISTRIB}staff/
make distclean >/dev/null
rm -f staff.creator.user create_src_tarball update_qtcreator_files
svn st . --no-ignore | sed -n '/^[I\?]/s/^.[ \t]*//p' | xargs rm -rf
find -type d -name .svn | xargs rm -Rf
cd ..
if [ -z "$(which 7z)" ]
then
tar c staff | bzip2 >${TARBALLNAME}.tar.bz2
rm -Rf ${DISTRIB}
echo "created ${TARBALLNAME}.tar.bz2"
else
7z a -r $@ ${TARBALLNAME}.7z staff
rm -Rf ${DISTRIB}
echo "created ${TARBALLNAME}.7z"
fi