diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-03-13 21:53:29 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-03-13 21:53:29 +0800 |
| commit | 0ff09a37a5cbb984c850f5899c93abe07ca85ff4 (patch) | |
| tree | 75572f3072298641e6d58293e0f9c2f7ff057f0a | |
| parent | 299ef83df0c1b90094e00ef5ad7a9c0c49f71423 (diff) | |
| download | cvn-0ff09a37a5cbb984c850f5899c93abe07ca85ff4.tar.gz | |
Init command.
| -rw-r--r-- | vcx | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use File::Path qw(make_path); + +my $cmd = $ARGV[0] // ''; + +if ($cmd eq 'init') { + init_repo(); +} else { + print "Usage: $0 [command]\n"; + exit 1; +} + +sub init_repo { + my @dirs = ( + '.vcx/obj', + '.vcx/bse', + '.vcx/tmp' + ); + + foreach my $dir (@dirs) { + if (!-d $dir) { + make_path($dir); + print "Created: $dir\n"; + } + } + + print "Repository ready\n"; +} + + |
