Do not re-install gnash key if it is already installed
[hvlinux.git] / stage2 / cis-grub
index 02b2bfb..bef600a 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh
+#!/bin/bash
+set -o errexit
+
 # First argument of this script is the package name
 
 # Reading system configuration informations, functions and package versions.
@@ -6,20 +8,29 @@ source ../sysinfos
 source ../functions
 source ../packages-list
 
-# Applying patches (if any)
-apply_patches ${1} &&
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Manually applying patches because of order
+apply_patch ${PACKAGE}-use_mmap-1.patch ${PACKAGE}
+apply_patch ${PACKAGE}-256byte_inode-1.patch ${PACKAGE}
+apply_patch ${PACKAGE}-ext4-1.patch ${PACKAGE}
+apply_patch ${PACKAGE}-fixes-1.patch ${PACKAGE}
 
 GRUB_STAGE_FILES="/usr/lib/grub/i386-pc"
 
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --prefix=/usr &&
-make -j ${MAKEJOBS} &&
-make install &&
+cd ${LFS_TMP}/${PACKAGE}-build
+../${PACKAGE}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    ${CONFIGURE_OPTS}
+make -j ${MAKEJOBS}
+make install
 
-mkdir -p /boot/grub &&
-cp -a ${GRUB_STAGE_FILES}/stage{1,2} /boot/grub &&
+mkdir -p /boot/grub
+cp -a ${GRUB_STAGE_FILES}/stage{1,2} /boot/grub
 cp -a ${GRUB_STAGE_FILES}/{e2fs,reiserfs}_stage1_5 /boot/grub
 
-# Return last error
 exit $?
+