From 431a177ba64b294b239de986617b6d46994bdc41 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 1 Feb 2007 00:20:47 +0000 Subject: verbose enhancements :) git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@146 04377dda-e619-0410-9926-eae83683ac58 --- src/simplaret | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/simplaret b/src/simplaret index 5cab07d..c39bcd7 100755 --- a/src/simplaret +++ b/src/simplaret @@ -92,7 +92,7 @@ function simplaret_download { if [ "$4" == "--no-verbose" ]; then wget_verbose="--no-verbose" curl_verbose="-#" - echo " " + echo "" fi if [ "$protocol" == "http" ]; then @@ -140,6 +140,10 @@ function simplaret_download { fi fi + if [ "$4" == "--no-verbose" ]; then + echo "" + fi + } function simplaret_repository { @@ -429,8 +433,8 @@ function simplaret_search_and_delete { if [ "`package_version $candidate`" == "`package_version $result`" ] && \ [ "`package_build $candidate`" == "`package_build $result`" ]; then if [ "$3" != "--silent" ]; then - echo package $candidate already downloaded - # echo package $candidate stored at `dirname $file` + echo Package $candidate already downloaded + # echo Package $candidate stored at `dirname $file` else echo $file fi return 1 @@ -494,13 +498,13 @@ function simplaret_get { if [ ! -f "$folder/$candidate" ]; then if [ "$2" != "--silent" ]; then - echo error downloading $candidate from $repos_type repository $repository_url, please check your settings + echo Error downloading $candidate from $repos_type repository $repository_url, please check your settings fi return 1 else if [ "$2" != "--silent" ]; then silent="" - echo package $candidate stored at $folder + echo Package $candidate stored at $folder else echo $folder/$candidate silent="--silent" @@ -539,7 +543,7 @@ function simplaret_search_and_download_patch { # check if the patch was already downloaded if echo "$DOWNLOADED_PATCHES" | grep -q " $ARCH:$VERSION:$sugested "; then - echo "jail $root needs package $sugested (already downloaded, skipping)" + echo "Jail $root needs package $sugested (already downloaded, skipping)" fi # search if its installed in the jail @@ -634,7 +638,7 @@ function simplaret_get_jail_patches { DISTRO_UPDATED="$DISTRO_UPDATED $ARCH:$VERSION " # the ending space is important fi - echo fetching patches for arch $ARCH and version $VERSION for jail $root + echo Fetching patches for arch $ARCH and version $VERSION for jail $root # list all available patches from PATCHES and ROOT repositories for sugested in `simplaret_search --formatted | grep patches | grep -v ",repos," | grep -v ",noarch,"`; do @@ -693,7 +697,7 @@ function simplaret_checksum { if [ ! -f "$1" ] || [ ! -f "$2" ]; then if [ "$3" != "--silent" ]; then - echo checksum error: file not found + echo Checksum error: file not found fi return 1 fi @@ -706,12 +710,12 @@ function simplaret_checksum { return 1 elif [ "$checksum" != "`md5sum $2 | awk '{ print $1 }'`" ]; then if [ "$3" != "--silent" ]; then - echo checksum mismatch for file `basename $file` + echo Checksum mismatch for file `basename $file` fi return 1 else if [ "$3" != "--silent" ]; then - echo checksum ok for file `basename $file` + echo Checksum ok for file `basename $file` fi return 0 fi -- cgit v1.2.3