[Lunar-commits] <lunar> lvu: Properly check if module exist before showing compile log
Stefan Wold
ratler at lunar-linux.org
Mon Nov 22 11:51:48 CET 2010
commit ba0d5682ae144b96e5fac16ee6105daff2fe98d7
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Mon Nov 22 11:51:48 2010 +0100
lvu: Properly check if module exist before showing compile log
---
bin/lvu | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/bin/lvu b/bin/lvu
index 3880db3..0627efb 100755
--- a/bin/lvu
+++ b/bin/lvu
@@ -1355,15 +1355,17 @@ main() {
;;
compile)
- run_details $2 ;
- if [ -f $COMPILE_LOGS/$2-$(module_version $2).bz2 ] ; then
- view_file $COMPILE_LOGS/$2-$(module_version $2).bz2
- else
- VERSION=$(installed_version $2)
- view_file $COMPILE_LOGS/$2-$(installed_version $2).bz2 \
- "Compile log for $2 does not exist"
+ if [ ! -z "$2" ]; then
+ if run_details $2 ; then
+ if [ -f $COMPILE_LOGS/$2-$(module_version $2).bz2 ] ; then
+ view_file $COMPILE_LOGS/$2-$(module_version $2).bz2
+ else
+ VERSION=$(installed_version $2)
+ view_file $COMPILE_LOGS/$2-$(installed_version $2).bz2 \
+ "Compile log for $2 does not exist"
+ fi
fi
- #fi
+ fi
;;
install)
More information about the Lunar-commits
mailing list