Installation xdm
[hvlinux.git] / functions
index b799c51..8ee7dd0 100644 (file)
--- a/functions
+++ b/functions
@@ -22,6 +22,8 @@ BRACKET="\033[1;34m"
 
 TAR_OPTS="-b8"
 
+HV_FONTS_PATH="/usr/share/fonts"
+
 # It seems that when compiling bash-4.0, using
 # "make -j 1" is causing problems...
 if [ "x${MAKEJOBS}" = "x1" ]; then
@@ -97,7 +99,7 @@ get_pkg_name()
        return 1
     fi
 
-    echo ${1} | sed "s!^\(.*\)-.*!\1!g"
+    echo ${1} | sed "s!^\(.*\)-[0-9]*\.[0-9]*.*!\1!g"
 }
 
 # Saves the content of CFLAGS and CXXFLAGS environment variables.
@@ -853,7 +855,14 @@ rcmd()
 
     # Executing command
     ${CMD_WITH_ARGS} 1>> ${LFS_LOG_FILE} 2>&1
-    eval_retval
+    if [ $? -ne 0 ]; then
+       print_status failure
+        if [ -n "${RCMD_NO_EXIT}" ]; then
+            return ${EXIT_FAILURE}
+        else
+           exit ${EXIT_FAILURE}
+        fi
+    fi
 
     # Displaying build time after the package name
     print_status success