Created
June 19, 2023 13:59
-
-
Save earnhardt3rd/41838db2672cec2f9cd03f777712c3f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'getopts.pl'; | |
| Getopts('m:d:t'); | |
| my $MODE = uc($opt_m) || ""; | |
| my $DEBUG = $opt_d || 0; | |
| if (defined $opt_t) { my %TEST = &buildManualWinFiles();} | |
| 1; | |
| sub buildManualWinFiles { | |
| my $line = $_[0]; | |
| print " W:$line\n" if $DEBUG > 0; | |
| my $to = $line; | |
| $to =~ s/NXROOT//g; | |
| $to =~ s/^\\//; | |
| $to =~ s/^\///; | |
| $to =~ s/\\/_-_/g; | |
| $to =~ s/\//_-_/g; | |
| $to = "\%COMPUTERNAME\%\\$to"; | |
| $line =~ s/NXROOT/\%NXROOT\%/; | |
| my $get = "copy \"$line\" \"${to}\""; | |
| my $put = "copy \"$to\" \"$line\""; | |
| open (GT,">> $gwFile"); | |
| print " gw: $get\n" if $DEBUG > 0; | |
| print GT "$get\n"; | |
| close(GT); | |
| open (GT,">> $pwFile"); | |
| print " gp: $put\n" if $DEBUG > 0; | |
| print GT "$put\n"; | |
| close(GT); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment