Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F70415995
update-purge-list.pl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 6, 18:38
Size
753 B
Mime Type
text/x-perl
Expires
Mon, Jul 8, 18:38 (2 d)
Engine
blob
Format
Raw Data
Handle
18288266
Attached To
rLAMMPS lammps
update-purge-list.pl
View Options
#!/usr/bin/perl -w
use
strict
;
my
$
date=
""
;
my
$
newdate=
""
;
my
@list
;
my
$
scm
=
0
;
open
(
GITLOG
,
'git log --summary |'
);
open
(
LIST
,
'> purge-list.txt'
);
while
(
<
GITLOG
>
)
{
chomp
;
if
(
/^
Date
:\s+
(.
*
)
/
)
{
$
newdate
=
$
1
;
}
if
(
/\s
+
delete
mode
\d
+
src\/
(
\
S
+
)
\/
(
\
S
+\.
(
cpp
|
h
)).
*/
)
{
#
check
if
file
exists
in
a
different
sub
directory
@list
=
glob
(
"[A-Z-][A-Z-]*/$2"
);
if
(
$
#list
<
0
)
{
#
check
if
file
got
moved
to
main
source
directory
$
scm
=
system
(
"git ls-files $2 --error-unmatch < /dev/null > /dev/null 2>&1"
);
if
(
$
scm
)
{
if
(
$
date
ne
$
newdate
)
{
$
date
=
$
newdate
;
print
LIST
"# deleted on $date\n"
;
}
print
LIST
"$2\n"
;
}
}
}
}
close
GITLOG
;
close
LIST
;
Event Timeline
Log In to Comment