ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/vendor/libarchive/3.2.1/build/bump-version.sh
Revision: 9167
Committed: Fri Oct 14 02:44:04 2016 UTC (7 years, 6 months ago) by laffer1
Content type: application/x-sh
File size: 815 byte(s)
Log Message:
tag 3.2.1

File Contents

# Content
1 #!/bin/sh +v
2
3 # Start from the build directory, where the version file is located
4 if [ -f build/version ]; then
5 cd build
6 fi
7
8 if [ \! -f version ]; then
9 echo "Can't find version file"
10 exit 1
11 fi
12
13 # Update the build number in the 'version' file.
14 # Separate number from additional alpha/beta/etc marker
15 MARKER=`cat version | sed 's/[0-9.]//g'`
16 # Bump the number
17 VN=`cat version | sed 's/[^0-9.]//g'`
18 # Reassemble and write back out
19 VN=$(($VN + 1))
20 rm -f version.old
21 mv version version.old
22 chmod +w version.old
23 echo $VN$MARKER > version
24 VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
25 cd ..
26
27 ANNOUNCE=`date +"%b %d, %Y:"`" libarchive $VS released"
28
29 echo $ANNOUNCE
30
31 # Add a version notice to NEWS
32 mv NEWS NEWS.bak
33 chmod +w NEWS.bak
34 echo $ANNOUNCE >> NEWS
35 echo >> NEWS
36 cat NEWS.bak >> NEWS