-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesktop_build_RemGlk_and_terp_r0.sh
executable file
·107 lines (83 loc) · 2.08 KB
/
desktop_build_RemGlk_and_terp_r0.sh
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/bin/bash
#
# (c) Copyright 2017 Stephen A. Gutknecht. All rights reserved.
# License granted: Public Domain.
#
# Makefile for RemGlk discussion
# http://www.intfiction.org/forum/viewtopic.php?f=7&t=19868&start=10
# TIP: "glulxer" means "glulxe remote"
#
# Recent work on Makefile integration with Z-terps for Plan 9 OS
# https://bitbucket.org/mycroftiv/cursesifinterpreters
#
below_directory_name="remglk_desktop_src"
build_directory_name="remglk_desktop_build"
pwd
# confirm the path is where we expect it to be for relative work
if [ ! -f "Thunderquake_Qt_GitHub.pro" ]; then
echo "!!!! ERROR_CODE:A00 expected Thunderquake_Qt_GitHub.pro does not exist, aborting"
exit 1
else
echo "!!!! Running from Thunderquake project folder"
fi
#
# *************************************************************
#
promptPause()
{
read -rsp $'Press any key to continue...\n' -n1 key
}
prepBuild()
{
echo "***"
echo "*** Github checkouts"
echo "****"
pwd
git clone https://github.com/erkyrath/remglk
git clone https://github.com/erkyrath/glulxe
echo "***"
echo "*** RemGlk"
echo "***"
cd remglk
pwd
make
cd ..
if [ ! -f "../terpmake/Glulxe_RemGlk_Makefile" ]; then
echo "!!!! ERROR_CODE:A00 Glulxe_RemGlk_Makefile not found"
echo "***"
echo "*** Glulxe Makefile needs to be revised to pick RemGlk"
echo "***"
promptPause
else
cp "../terpmake/Glulxe_RemGlk_Makefile" glulxe/Makefile
fi
cd glulxe
make
}
#
# *************************************************************
# ** main starts here
#
if [ -d $below_directory_name ]
then
echo "'$below_directory_name' directory is ready"
else
mkdir $below_directory_name
fi
cd $below_directory_name
pwd
prepBuild
# check if output binary found
if [ -f "./glulxe" ]; then
# make a copy of the binary executable file with more specific name
cp ./glulxe remglk_glulxe
pwd
echo "***"
echo "*** executable binary should be at: remglk_desktop_src/glulxe/remglk_glulxe"
echo "***"
else
pwd
echo "***"
echo "*** executable binary should be ?? at: remglk_desktop_src/glulxe/glulxe"
echo "***"
fi