This repository has been archived by the owner on Feb 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbintar
73 lines (61 loc) · 1.69 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
#! /bin/csh -f
set T = "."
if ("$argv[1]" == "--target-dir") then
set T = "$argv[2]"
shift
shift
endif
if ($#argv != 2 && $#argv != 3) then
echo "Usage: $0 [ --target-dir <target-directory> ] <release> <machine-type> [ <workarea> ]"
exit 1
endif
set R = $argv[1]
set M = $argv[2]
if ($#argv == 2) then
set W = $M
else
set W = $argv[3]
endif
if (!(-d $W)) then
echo "Error: work area $W does not exist or is not a directory"
exit 1
endif
if (!(-e $W/boot/$M)) then
echo "Error: "$
exit 1
endif
if (-e $R) then
echo "Error: $R already exists"
exit 1
endif
onintr error
mkdir $R || goto error
( cd $R ; ln -s ../LICENSE ../NOTICE . ) || goto error
( cd $R ; ln -s ../$W/scheme.1.in ../$W/installsh ../$W/examples . ) || goto error
( cd $R ; ln -s ../$W/Mf-install Makefile ) || goto error
mkdir -p $R/boot/$M $R/bin/$M || goto error
( cd $R/boot/$M ; ln -s ../../../$W/boot/$M/{scheme.h,petite.boot,scheme.boot} . ) || goto error
switch ($M)
case a6nt:
case ta6nt:
case ti3nt:
case i3nt:
( cd $R/boot/$M ; ln -s ../../../$W/boot/$M/{csv951md.lib,csv951mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) || goto error
( cd $R/bin/$M ; ln -s ../../../$W/bin/$M/{scheme.exe,csv951.dll,csv951.lib,vcruntime140.lib} . ) || goto error
breaksw
default:
( cd $R/boot/$M ; ln -s ../../../$W/boot/$M/{main.o,kernel.o} . ) || goto error
( cd $R/bin/$M ; ln -s ../../../$W/bin/$M/{scheme} . ) || goto error
breaksw
endsw
set broken = `find -L $R -type l`
if ($#broken != 0) then
echo "Error: missing $broken"
goto error
endif
tar -czhf $T/csv$R-$M.tar.gz $R || goto error
rm -rf $R
exit
error:
rm -rf $R
exit 1