File: mkdist

package info (click to toggle)
ace-of-penguins 1.5~rc2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,532 kB
  • sloc: sh: 13,542; ansic: 9,852; makefile: 249; perl: 36
file content (44 lines) | stat: -rwxr-xr-x 603 bytes parent folder | download | duplicates (8)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/perl5
# -*- perl -*-

$src = '
	Makefile
	COPYING
	ChangeLog
	docs/*
	lib/*.gif
	lib/*.h
	lib/Makefile
	lib/[abd-t]*.c
	tests/*.c
	tests/*.gif
	tests/Makefile
	games/*.gif
	games/*.html
	games/*.c
	games/*.h
	games/*.tp
	games/split-tiles
	games/Makefile
	games/t/*
';

$src =~ s/[\n\t\r\s]+/ /g;

$pwd = `pwd`;
$pwd =~ s/[\r\n]+$//;
$pwd =~ s@.*/@@;

open(LS, "ls -1 $src | sort |");
chdir "..";
open(TAR, "| tar cvf - -T - | gzip -9 > $pwd/$pwd.tar.gz");


while (<LS>) {
    s/[\r\n]+$//;
    next if /-(help|img)\.c/;
    next if /[\~\#]/;
    print TAR "$pwd/$_\n";
}
close(LS);
close(TAR);