-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.pl
executable file
·45 lines (31 loc) · 977 Bytes
/
package.pl
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
#!/usr/bin/perl
print "Clear export dir? [y/N]? ";
$answer = <STDIN>;
chomp $answer;
unless($answer =~ /^[yY]$/) {
print "Aborting\n";
exit 0;
}
print "Cleaning export directory..\n";
`rm export/*`;
$export_dir = `pwd`;
chomp $export_dir;
$export_dir .= "/export";
print "Please run export in Godot. Make sure your export dir is '$export_dir'\n";
print "Press enter to continue.";
$answer = <STDIN>;
print "Creating zip file for itch.io..\n";
$original_name = `ls export | grep '.html'`;
chomp $original_name;
`mv export/$original_name export/index.html`;
`zip export/upload.zip export/*`;
print "Zip file created at $export_dir/upload.zip!\n";
print "Ready to upload? [y/N]? ";
$answer2 = <STDIN>;
chomp $answer2;
if($answer2 =~ /^[yY]$/) {
`butler push export/upload.zip dorthu/pluck:html5`;
print "Upload complete!\n";
} else {
print "That's fine. To upload it later, run ' butler push export/upload.zip dorthu/working-title:html5'\n";
}