X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fjava-package.git;a=blobdiff_plain;f=lib%2Fcommon.sh;h=64f5810b8f9bff9d61c22c2b037bf98da7f5d348;hp=60c28522fe669a957361fa0ca2fae948732de99a;hb=adec26aa8261b379a1db4ca72142b7ddc51f4e75;hpb=9e241f83087a526985b6edbc7070d5dc36a1ac33 diff --git a/lib/common.sh b/lib/common.sh index 60c2852..64f5810 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -1,5 +1,5 @@ # read_yn -function read_yn() { +read_yn() { local prompt="$1" while true; do read -e -n 1 -p "$prompt" reply @@ -16,7 +16,7 @@ function read_yn() { # diskusage : prints size in MB -function diskusage() { +diskusage() { local path="$1" read size dummy < <( du -sm "$path" ) echo "$size" @@ -24,7 +24,7 @@ function diskusage() { # diskfree -function diskfree() { +diskfree() { local size="$1" echo -n "Checking free diskspace:" (( free = `stat -f -c '%a / 2048 * ( %s / 512 )' $tmp ` )) @@ -51,7 +51,7 @@ EOF # extract_bin -function extract_bin() { +extract_bin() { local file="$1" local expected_min_size="$2" local dest="$3" @@ -129,7 +129,7 @@ EOF } -function read_maintainer_info() { +read_maintainer_info() { if [ -z "$maintainer_name" ]; then if [ -n "$DEBFULLNAME" ]; then maintainer_name="$DEBFULLNAME" @@ -181,7 +181,7 @@ EOF } # provide the architecture for evaluation by plugins -function get_architecture() { +get_architecture() { echo export DEB_BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)