File: mkpkg

package info (click to toggle)
cmigemo 1:1.2+gh0.20140306-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,668 kB
  • ctags: 1,550
  • sloc: ansic: 2,617; lisp: 656; cs: 188; makefile: 174; sh: 172; cpp: 67; perl: 59; csh: 49
file content (64 lines) | stat: -rw-r--r-- 1,260 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/csh
# vim:set ts=8 sts=2 sw=2 tw=0:
#
# Last Change: 17-Jan-2003.
# Written By:  MURAOKA Taro <koron@tka.att.ne.jp>

set pkgname = "cmigemo"
set pkgverex = ""

if ($1 != '') then
  set pkgver = "$1"
else if (-e VERSION) then
  set pkgver = `cat VERSION`
else
  echo ""
  echo "Please specify package version string."
  echo "Example: './mkpkg 1.0-xxx '"
  exit
endif

if (-e CVS/Root) then
  set cvsroot = `cat CVS/Root`
else
  set cvsroot = ':pserver:anonymous@cvs.kaoriya.net:/anonycvs'
endif

if (-e CVS/Repository) then
  set cvsrepository = `cat CVS/Repository`
else if (-e .cvsrepository)
  set cvsrepository = `cat .cvsrepository`
else
  set cvsrepository = 'unknown'
endif

if (-e CVS/Revision) then
  set cvsrevision = `cat CVS/Revision`
else
  set cvsrevision = '-D now'
endif

set pkgdir = "${pkgname}-${pkgver}${pkgverex}"
echo "${pkgdir}: "
cd ..
rm -rf "$pkgdir"

echo -n "  Making package dir ..."
cvs -d $cvsroot -Q export $cvsrevision -d $pkgdir $cvsrepository
echo "finish"

echo -n "  Archiving ..."
tar cf "${pkgdir}.tar" "$pkgdir"
echo "finish"

echo -n "  Compressing ..."
bzip2 -f "${pkgdir}.tar"
echo "finish"

echo ""
rm -rf "$pkgdir"
if ("$version" =~ *Win*) then
  start .
else if ("$version" =~ *darwin*) then
  open .
endif