-
Notifications
You must be signed in to change notification settings - Fork 29
/
mkpkg
64 lines (54 loc) · 1.23 KB
/
mkpkg
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 <[email protected]>
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:[email protected]:/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