-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_tar.sh
More file actions
59 lines (41 loc) · 957 Bytes
/
Copy pathcreate_tar.sh
File metadata and controls
59 lines (41 loc) · 957 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#
# create tar ball.
# $Id: create_tar.sh 24 2015-03-27 00:53:24Z w0anm $
if [ -z "$1" ] ; then
version=$(svn info | grep Rev: | awk '{print $4}')
else
version=$1
fi
REPO=arm_wxscripts
TMP_DIR=/tmp/$REPO
SVN_SRC_DIR=$(pwd)
if [ ! -d /tmp/$REPO ] ; then
mkdir -p /tmp/$REPO
fi
cd $SVN_SRC_DIR
# run as root
cd ..
cp -rp $SVN_SRC_DIR/* /tmp/$REPO/.
cd /tmp
# remove unwanted files
rm -rf /tmp/$REPO/.svn
rm -f /tmp/$REPO/create_tar.sh
rm -f /tmp/$REPO/*.tgz
rm -rf /tmp/$REPO/not_available
rm -rf /tmp/$REPO/archive
rm -rf /tmp/$REPO/sandbox
rm -f next_releaseToDo.txt
# fix permissions
chown -R root:root /tmp/$REPO
chmod 755 /tmp/$REPO/src/*
# create compressed tar file
tar zcf ${SVN_SRC_DIR}/arm-wxscripts-0.${version}.tgz -C /tmp ./$REPO
# create zip file
# zip -r ${SVN_SRC_DIR}/BBB-wxscripts-0.${version}.zip ./$REPO
rm -rf /tmp/$REPO
cd $SVN_SRC_DIR
chown ckovacs:ckovacs ./*.tgz
echo
echo "Done...":
exit