forked from cisco/ChezScheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bintar
89 lines (83 loc) · 2.78 KB
/
bintar
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#! /bin/csh -f
if ($#argv < 3) then
echo "Usage: $BINTAR <release> <dist-type> <machine-type1> <machine-type2> ..."
exit(1)
endif
set release = $argv[1]
if (!(-d $release)) then
echo Release $release does not exist or is not a directory
exit(1)
endif
switch ($argv[2])
case tar.gz:
if (!($?tarfile)) set tarfile = "$release"
foreach x ($argv[3-])
set tarfile = "$tarfile"-$x
end
set tarfile = "$tarfile".tar.gz
alias command 'tar -chf - \!* | gzip -c >' $tarfile
breaksw
default
echo Unknown target $argv[2]
exit(1)
endsw
set files = ()
set files = ($files $release/{Notice,ReadMe})
set files = ($files $release/License)
set files = ($files $release/examples/*)
set files = ($files $release/custom/{ReadMe,custom.c})
set files = ($files $release/custom/{crepl.c,sample.c,sample.ss})
foreach m ($argv[3-])
set files = ($files $release/boot/$m/scheme.h)
set files = ($files $release/boot/$m/petite.boot)
set files = ($files $release/boot/$m/scheme.boot)
switch ($m)
case a6nt:
case ta6nt:
case ti3nt:
case i3nt:
set files = ($files $release/bin/$m/scheme.exe)
set files = ($files $release/bin/$m/csv941.dll)
set files = ($files $release/bin/$m/csv941.lib)
set files = ($files $release/bin/$m/vcruntime140.dll)
set files = ($files $release/boot/$m/csv941md.lib)
set files = ($files $release/boot/$m/csv941mt.lib)
set files = ($files $release/boot/$m/custommd.obj)
set files = ($files $release/boot/$m/custommt.obj)
set files = ($files $release/boot/$m/scheme.res)
set files = ($files $release/custom/Makefile.$m)
breaksw
default:
set files = ($files $release/bin/$m/scheme)
set files = ($files $release/boot/$m/custom.o)
set files = ($files $release/boot/$m/kernel.o)
set files = ($files $release/custom/Mf-$m)
if (! $?custom_make) then
set files = ($files $release/custom/{configure,Makefile.in,Mf-none,Mf-install.in,installsh})
set files = ($files $release/custom/scheme.1.in)
set custom_make
endif
breaksw
endsw
end
if ($?INTERACTIVE) then
ls -lL $files | more -10
askokay:
echo -n "Okay? (y/n) [y]: "
set ans = $<
if ("$ans" == "n") exit(1)
if ("$ans" != "" && "$ans" != "y") goto askokay
again:
echo "Command Alias:"
alias command
echo -n "Okay? (y/n) [y]: "
set ans = $<
if ("$ans" != "" && "$ans" != "y") then
if ("$ans" == "n") then
echo -n "Enter appropriate command: "
alias command "$<"
endif
goto again
endif
endif
command $files