-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpi6
executable file
·57 lines (51 loc) · 1.01 KB
/
pi6
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
#!/bin/bash
# pi6 3.0 - the Inform 6 command-line wrapper
# Puny Buildtools, (c) 2024 Stefan Vogt
source ~/FictionTools/.pi6rc
inform=~/FictionTools/inform
custom=~/FictionTools/punycustom/
v=-v5
main()
{
printf "pi6 - story file compilation started [...]\n"
$inform -d2esi $v +$custom,$lib $game
game=`basename $game .inf`
printf "\n"
exit 0
}
usage()
{
printf "pi6 3.0 - the Inform 6 command-line wrapper\n"
printf "Puny BuildTools, (c) 2024 Stefan Vogt\n\n"
printf "Usage: pi6 game.inf\n"
printf " pi6 [-3] game.inf\n"
printf " pi6 [-5] game.inf\n\n"
printf " -3 : create Z-machine v3 release\n"
printf " -5 : create Z-machine v5 [XZIP] release\n\n"
printf "By default pi6 creates Z-machine v5 releases.\n\n"
exit 0
}
# Start of script
if [ ! -z `echo $1 | grep '.inf'` ]; then
game=$1
main
elif [ -z "$1" ]; then
usage
fi
while getopts 53:h opts
do
case $opts in
5) game=$2
v=-v5
main
;;
3) game=$2
v=-v3
main
;;
h) usage
;;
*) usage
;;
esac
done