-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmydef_update.def
More file actions
32 lines (25 loc) · 844 Bytes
/
mydef_update.def
File metadata and controls
32 lines (25 loc) · 844 Bytes
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
page: mydef_update
output_dir: script
type:
$call get_MYDEFSRC_or_die
system "cd MyDef && git pull && make && make install"
my @all = glob("output_*")
$foreach $a in @ARGV
$if $a=~/(output_\w+)/
push @all, $1
$foreach $a in @all
$if !-d $a
system "git clone https://github.com/hzhou/$a"
$if -d $a and -d "$a/.git"
$print $green{$a} ....
system "cd $a && git pull origin master && mydef_make && make && make install"
# -------------------------
subcode: get_MYDEFSRC_or_die
my $dir
$if $ENV{MYDEFSRC}=~/(.*)\/MyDef/
$dir = $1
$if !$dir
die "Missing MYDEFSRC location\n"
$if !-d $dir
die "Not a directory [$dir]\n"
chdir $dir or die "Cannot chdir $dir\n"