File: mkpkgadd

package info (click to toggle)
octave2.1-forge 2006.03.17%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 16,672 kB
  • ctags: 6,047
  • sloc: cpp: 49,610; ansic: 14,035; perl: 2,789; sh: 2,087; makefile: 1,560; lex: 1,219; tcl: 799; fortran: 422; objc: 202
file content (27 lines) | stat: -rwxr-xr-x 468 bytes parent folder | download | duplicates (3)
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
#! /bin/sh

if test $# -eq 1; then
  dir="$1"
else
  echo "usage: mkpkgadd directory" 1>&2
  exit 1
fi

cd $dir

m_files=`echo *.m`
cxx_files=`echo *.cc`
ln_files=`echo *.octlink`

if test "$m_files" != "*.m"; then
  sed -n 's/^[#%][#%]* *PKG_ADD: *//p' $m_files
fi

if test "$cxx_files" != "*.cc"; then
  sed -n -e 's,^//* *PKG_ADD: *,,p' \
         -e 's,^/\** *PKG_ADD: *\(.*\) \*/$,\1,p' $cxx_files
fi

if test "$ln_files" != "*.octlink" ; then
  cat $ln_files
fi