-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmake_src_release
More file actions
executable file
·37 lines (30 loc) · 888 Bytes
/
Copy pathmake_src_release
File metadata and controls
executable file
·37 lines (30 loc) · 888 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
#!/bin/bash
# script to help with building a source release package
#
# parameter 1 is the output directory
# parameter 2 is the version being released
# parameter 3 is the svn path
#
function PrintUsage()
{
echo "example:";
echo " ./make_src_release ~/sharppcap_releases 2.0.0 tags/SharpPcap_2_0_0";
}
if [ "$#" -ne 3 ]; then
PrintUsage
exit
fi
baseOutputDirectory=$1
releaseVersion=$2
svnPathPostfix=$3
# setup some variables
baseCheckoutDirectory=${baseOutputDirectory}/src
mkdir ${baseCheckoutDirectory}
svnPath=https://sharppcap.svn.sourceforge.net/svnroot/sharppcap/${svnPathPostfix}
dirName=SharpPcap-${releaseVersion}
# check out the files
checkoutDirectory=${baseCheckoutDirectory}/${dirName}
svn export ${svnPath} ${checkoutDirectory}
# create a zip file of the directory
cd ${baseCheckoutDirectory}
zip -r ${baseCheckoutDirectory}/${dirName}.src.zip ${dirName}