File: src_create_release.sh

package info (click to toggle)
pokerth 1.1.2-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 57,920 kB
  • sloc: ansic: 83,615; cpp: 64,151; java: 3,135; xml: 596; sh: 221; makefile: 7
file content (40 lines) | stat: -rwxr-xr-x 942 bytes parent folder | download | duplicates (4)
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
#!/bin/bash
if [[ -n "$1" && -n "$2"  ]] ; then

	rm PokerTH-$1-src.tar.bz2
	rm -r PokerTH-$1-src
	mkdir PokerTH-$1-src
	cd PokerTH-$1-src
	
	# CHECKOUT PokerTH SOURCECODE
	if [[ -n "$3" ]] ; then
	  git clone https://github.com/pokerth/pokerth.git . -r $3
	else
	  git clone https://github.com/pokerth/pokerth.git .
	fi

	# CLEAN SOURCES
	find . -type d -name .git -exec rm -rf {} \;
	find . -type f -name .directory -exec rm -rf {} \;
	find . -type f -name *~ -exec rm -rf {} \;
	rm -rf debug
	rm -rf mocs
	rm -rf obj
	rm -rf old
	rm -rf qtc-gdbmacros
	rm -rf release
	rm -rf uics
	rm -rf bin
	rm -rf lib	

	cd ..
	tar -cvjf PokerTH-$1-src.tar.bz2 PokerTH-$1-src/
	scp PokerTH-$1-src.tar.bz2 doitux,pokerth@frs.sourceforge.net:/home/frs/project/p/po/pokerth/pokerth/$2/
	md5sum PokerTH-$1-src.tar.bz2
	  
	rm PokerTH-$1-src.tar.bz2
	rm -r PokerTH-$1-src

else
echo "Please use 'linux-create-release.sh version sf-dir-version (git-rev)'"
fi