示例#1
0
        static void clear_directory(String destDir, VersionManager vm) {
            foreach (String dir in System.IO.Directory.GetDirectories(destDir)) {
                if (vm.SkipClearDestDirDirectory(destDir, System.IO.Path.GetFileName(dir))) continue;
                clear_directory(dir, vm);
                if (System.IO.Directory.GetDirectories(dir).Length == 0 && System.IO.Directory.GetFiles(dir).Length == 0) {
                    System.IO.Directory.Delete(dir, true);
                }
            }

            foreach (String sfile in System.IO.Directory.GetFiles(destDir)) {
                if (vm.SkipClearDestDirFile(destDir, System.IO.Path.GetFileName(sfile))) continue;
                System.IO.File.Delete(sfile);
            }
        }
示例#2
0
        static void Main(string[] args) {
            if (args.Length < 4) {
                help();
                return;
            }
            if (args[0] == "--copy") {
                copy_dirs(args[1], args[2], new FileProcessor(args[3]));
                return;
            }

            String tag_version = args[3];
            bool breverse = tag_version.StartsWith("!");
            if (breverse) tag_version = tag_version.Substring(1, tag_version.Length - 1);

            VersionManager vm = new VersionManager(args[2], tag_version, extract_package_name(args[0] + "\\AndroidManifest.xml"), breverse);

            clear_directory(args[1], vm);

            Splitter sp = new Splitter(vm, args[0]);
            sp.Split(args[0], args[1]);
        }
示例#3
0
 public Splitter(VersionManager vm, String srcDir) {
     m_Vm = vm;
     m_PackageDirectory = vm.OriginalPackageName.Replace(".", "\\").ToLower();
 }