Added procreate

This commit is contained in:
Leeland Heins 2019-03-05 14:24:42 -06:00 committed by GitHub
parent a6457c2c12
commit cf9c0a081b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

View File

@ -2151,5 +2151,18 @@ sub unlock_file {
return 1;
}
#
# Create a subdirectory.
#
sub create_subdir {
my ($pofile, $subdirname, $dbg) = @_;
$debug = 1 if defined $dbg && $dbg;
print "pofile=$pofile subdirname=$subdirname\n" if $debug;
return 1;
}
1;

1
README
View File

@ -10,4 +10,5 @@ prodelete.pl -- nearly working
prolock.pl -- partially working
prounlock.pl -- partially working
procopy.pl -- started
procreate.pl --

33
procreate.pl Normal file
View File

@ -0,0 +1,33 @@
#!/usr/bin/perl -w
#
# procreate.pl:
#
# Utility to create a subdirectory on an Apple II ProDOS .po disk image.
#
# 20190305 LSH
#
use strict;
use ProDOS;
my $debug = 0;
while (defined $ARGV[0] && $ARGV[0] =~ /^-/) {
# Debug
if ($ARGV[0] eq '-d') {
$debug = 1;
shift;
} else {
die "Unknown command line argument $ARGV[0]\n";
}
}
my $pofile = shift or die "Must supply .po filename\n";
my $subdirname = shift or die "Must supply subdirectory name (on disk image)\n";
create_subdir($pofile, $subdirname, $debug);
1;