debian: stylistic harmony

This commit is contained in:
Travis Cross 2012-05-05 20:28:46 +00:00
parent b281e1340b
commit 75da872259

20
debian/bootstrap.sh vendored
View File

@ -42,7 +42,7 @@ err () {
exit 1 exit 1
} }
xread() { xread () {
local xIFS="$IFS" local xIFS="$IFS"
IFS='' IFS=''
read $@ read $@
@ -93,7 +93,7 @@ map_fs_modules () {
done done
} }
map_modules() { map_modules () {
local filterfn="$1" percatfns="$2" permodfns="$3" local filterfn="$1" percatfns="$2" permodfns="$3"
for x in $parse_dir/*; do for x in $parse_dir/*; do
test -d $x || continue test -d $x || continue
@ -592,7 +592,7 @@ accumulate_build_depends () {
fi fi
} }
genmodctl_new_mod() { genmodctl_new_mod () {
grep -e "^Module: ${module}$" control-modules >/dev/null && return 0 grep -e "^Module: ${module}$" control-modules >/dev/null && return 0
cat <<EOF cat <<EOF
Module: $module Module: $module
@ -602,7 +602,7 @@ EOF
echo echo
} }
genmodctl_new_cat() { genmodctl_new_cat () {
grep -e "^## mod/${category}$" control-modules >/dev/null && return 0 grep -e "^## mod/${category}$" control-modules >/dev/null && return 0
cat <<EOF cat <<EOF
## mod/$category ## mod/$category
@ -610,7 +610,7 @@ genmodctl_new_cat() {
EOF EOF
} }
pre_parse_mod_control() { pre_parse_mod_control () {
local fl=true ll_nl=false ll_descr=false local fl=true ll_nl=false ll_descr=false
while xread l; do while xread l; do
if [ -z "$l" ]; then if [ -z "$l" ]; then
@ -645,11 +645,11 @@ pre_parse_mod_control() {
done < control-modules done < control-modules
} }
var_escape() { var_escape () {
(echo -n \'; echo -n "$1" | sed -e "s/'/'\\\\''/g"; echo -n \') (echo -n \'; echo -n "$1" | sed -e "s/'/'\\\\''/g"; echo -n \')
} }
parse_mod_control() { parse_mod_control () {
pre_parse_mod_control > control-modules.preparse pre_parse_mod_control > control-modules.preparse
local category="" local category=""
local module_name="" local module_name=""
@ -678,7 +678,7 @@ parse_mod_control() {
done < control-modules.preparse done < control-modules.preparse
} }
debian_wrap() { debian_wrap () {
local fl=true local fl=true
echo "$1" | fold -s -w 69 | while xread l; do echo "$1" | fold -s -w 69 | while xread l; do
local v="$(echo "$l" | sed -e 's/ *$//g')" local v="$(echo "$l" | sed -e 's/ *$//g')"
@ -691,11 +691,11 @@ debian_wrap() {
done done
} }
genmodctl_cat() { genmodctl_cat () {
(echo "## mod/$category"; echo) (echo "## mod/$category"; echo)
} }
genmodctl_mod() { genmodctl_mod () {
echo "Module: $module" echo "Module: $module"
echo "Description: $description" echo "Description: $description"
echo "$long_description" | fold -s -w 69 | while xread l; do echo "$long_description" | fold -s -w 69 | while xread l; do