diff options
Diffstat (limited to 'kdpkg-install/sh/kdpkg-sh')
-rwxr-xr-x | kdpkg-install/sh/kdpkg-sh | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/kdpkg-install/sh/kdpkg-sh b/kdpkg-install/sh/kdpkg-sh index e192a09..59b3ad1 100755 --- a/kdpkg-install/sh/kdpkg-sh +++ b/kdpkg-install/sh/kdpkg-sh @@ -1,12 +1,19 @@ -#!/bin/sh -# (C) Fabian Wuertz Feb 2008 +#!/bin/bash +# (c) 2010 Timothy Pearson +# (c) Fabian Wuertz Feb 2008 if [ "$1" == "update" ]; then apt-get update - echo "" - echo "Done! Press enter to continuo." - read + if [ $? -eq 0 ]; then + echo "" + echo "Update OK" + else + echo "" + echo "Errors were encountered while updating the package index" + echo "Please press enter to continue" + read + fi fi if [ "$1" == "install" ]; then @@ -19,10 +26,22 @@ if [ "$1" == "install" ]; then apt-get remove $removePackage fi dpkg -i $2 - apt-get install -f - echo "" - echo "Done! Press enter to continuo." - read + if [ $? -eq 0 ]; then + apt-get install -f + if [ $? -eq 0 ]; then + echo "" + echo "Installation OK" + else + echo "" + echo "Errors were encountered while installing your package" + echo "Please press enter to exit" + read + fi + else + echo "" + echo "Errors were encountered while installing your package" + echo "Please press enter to continue" + read + fi fi - |