File: pickpkg

package info (click to toggle)
xcingb 2.3.02-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,492 kB
  • ctags: 877
  • sloc: ansic: 9,779; sh: 1,460; makefile: 299; awk: 12
file content (44 lines) | stat: -rwxr-xr-x 1,097 bytes parent folder | download | duplicates (4)
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/sh

if [ ! -d 'pkg' ]; then mkdir pkg; fi

ff=`cat filelist`

for f in $ff; do
    if [ -z "$f" ]; then
	continue

    elif [ ! -z "`echo $f | grep ':'`" ]; then
        rootdir=`echo $f | sed 's/://'`

    elif [ ! -z "`echo $f | grep '/bin'`" ]; then
	if [ ! -d "pkg/bin" ]; then mkdir pkg/bin; fi
	uf="$rootdir/`basename $f`"
	echo "cp $uf ==> pkg/bin"
	cp $uf pkg/bin

    elif [ ! -z "`echo $f | grep '/man'`" ]; then
	if [ ! -d "pkg/man" ]; then mkdir pkg/man; fi
	uf="$rootdir/man/`basename $f`"
	echo "cp $uf ==> pkg/man"
	cp $uf pkg/man

    elif [ ! -z "`echo $f | grep '/xcin/docs'`" ]; then
	if [ ! -d "pkg/xcin" ]; then mkdir pkg/xcin; fi
	if [ ! -d "pkg/xcin/docs" ]; then mkdir pkg/xcin/docs; fi
	uf="$rootdir/howto/`basename $f`"
	if [ ! -f $uf ]; then
	    uf="$rootdir/misc/`basename $f`"
	fi
	echo "cp $uf ==> pkg/xcin/docs"
	cp $uf pkg/xcin/docs

    elif [ ! -z "`echo $f | grep '/xcin'`" ]; then
	if [ ! -d "pkg/xcin" ]; then mkdir pkg/xcin; fi
	uf="$rootdir/`basename $f`"
	echo "cp $uf ==> pkg/xcin"
	cp $uf pkg/xcin
    fi
done

cp config.status install.status pkg