summaryrefslogtreecommitdiff
path: root/package/pkgmaker
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-15 12:35:48 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-15 12:35:48 +0200
commit7c38c7a7843d881837f000b9465bd59a0e918f7f (patch)
tree738c19bacd1c0dd4f939298ceaf59013a76dc6f6 /package/pkgmaker
parentcad729cef7e4226eb09ca510546776ac4e8b551d (diff)
parent7838fca0479a0d4affcb245ec042ead7ae1d7b3b (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/pkgmaker')
-rw-r--r--package/pkgmaker8
1 files changed, 4 insertions, 4 deletions
diff --git a/package/pkgmaker b/package/pkgmaker
index f4d8355ef..e9e0abff5 100644
--- a/package/pkgmaker
+++ b/package/pkgmaker
@@ -303,22 +303,22 @@ EOF
done
# return good if given file exists and is non-empty
-function non_empty_file() {
+non_empty_file() {
[[ -f "$1" ]] || return 1
[[ -n "$(cat "$1")" ]] || return 1
return 0
}
# print the verbose section name for a given section tag
-function lookup_section_string() {
+lookup_section_string() {
str="$(grep ^$1\ sections.lst | cut -d ' ' -f '2-')"
[[ -n $str ]] && { echo $str; return; }
echo $1
}
# print the first prompt's first word's value in a given Config.in file
-function get_first_prompt() {
- prompt="$(grep -m 1 "prompt " $1 | sed -n 's/.*"\([^ \.]*\)[ \.].*"/\1/p')"
+get_first_prompt() {
+ prompt="$(grep "prompt " $1 |head -1| sed -n 's/.*"\([^ \.]*\)[ \.].*"/\1/p')"
[[ -n $prompt ]] && echo $prompt
}