root/trunk/freewrt/scripts/strip-script.sh

Revision 2545, 1.7 kB (checked in by tg, 2 years ago)

do not even TEMPT people like aep (Arvid Picciani) to make
these scripts +x, please just call them with sh…

Line 
1 # $FreeWRT: src/share/misc/licence.template,v 1.20 2006/12/11 21:04:56 tg Rel $
2 #-
3 # Copyright (c) 2007
4 #       Thorsten Glaser <tg@mirbsd.de>
5 #
6 # Provided that these terms and disclaimer and all copyright notices
7 # are retained or reproduced in an accompanying document, permission
8 # is granted to deal in this work without restriction, including un-
9 # limited rights to use, publicly perform, distribute, sell, modify,
10 # merge, give away, or sublicence.
11 #
12 # Advertising materials mentioning features or use of this work must
13 # display the following acknowledgement:
14 #       This product includes material provided by Thorsten Glaser.
15 # This acknowledgement does not need to be reprinted if this work is
16 # linked into a bigger work whose licence does not allow such clause
17 # and the author of this work is given due credit in the bigger work
18 # or its accompanying documents, where such information is generally
19 # kept, provided that said credits are retained.
20 #
21 # This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
22 # the utmost extent permitted by applicable law, neither express nor
23 # implied; without malicious intent or gross negligence. In no event
24 # may a licensor, author or contributor be held liable for indirect,
25 # direct, other damage, loss, or other issues arising in any way out
26 # of dealing in the work, even if advised of the possibility of such
27 # damage or existence of a defect, except proven that it results out
28 # of said person's immediate fault when using the work as intended.
29 #-
30 # Shell script to strip down a shell script (filter).
31
32 shopt -s extglob
33 cat "$@" | while read -r _line; do
34         set -o noglob
35         [[ $_line = \#* && $_line != @(#!)* ]] && continue
36         [[ -n $_line ]] && builtin printf '%s\n' "$_line"
37 done
38 exit 0
Note: See TracBrowser for help on using the browser.