summaryrefslogtreecommitdiff
path: root/configs/baseline/build.sh
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-07-14 00:46:42 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-08-15 01:07:30 -0300
commit808c1a0ed656ea99807a89ee95c9354539192fd3 (patch)
tree42f1036b71199508b8457065e9d388d8d7c03a44 /configs/baseline/build.sh
parent8b2acca2dee74e6a76dd12afa0d68d8631bb123c (diff)
downloadarchiso32-808c1a0ed656ea99807a89ee95c9354539192fd3.tar.xz
[configs/*] Use $script_path for "source" files.
Allows to execute directly build.sh from any directory, using it as working dir. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'configs/baseline/build.sh')
-rwxr-xr-xconfigs/baseline/build.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh
index 11d4145..2f28913 100755
--- a/configs/baseline/build.sh
+++ b/configs/baseline/build.sh
@@ -10,6 +10,8 @@ arch=$(uname -m)
work_dir=work
verbose="n"
+script_path=$(readlink -f ${0%/*})
+
# Base installation (root-image)
make_basefs() {
mkarchiso ${verbose} -D "${install_dir}" -p "base" create "${work_dir}"
@@ -30,7 +32,7 @@ make_boot() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
mkdir -p ${work_dir}/iso/${install_dir}/boot/${arch}
mkinitcpio \
- -c ./mkinitcpio.conf \
+ -c ${script_path}/mkinitcpio.conf \
-b ${work_dir}/root-image \
-k /boot/vmlinuz-linux \
-g ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img
@@ -45,7 +47,7 @@ make_syslinux() {
mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g;
- s|%ARCH%|${arch}|g" syslinux/syslinux.cfg > ${work_dir}/iso/${install_dir}/boot/syslinux/syslinux.cfg
+ s|%ARCH%|${arch}|g" ${script_path}/syslinux/syslinux.cfg > ${work_dir}/iso/${install_dir}/boot/syslinux/syslinux.cfg
cp ${work_dir}/root-image/usr/lib/syslinux/menu.c32 ${work_dir}/iso/${install_dir}/boot/syslinux/
: > ${work_dir}/build.${FUNCNAME}
fi
@@ -55,7 +57,7 @@ make_syslinux() {
make_isolinux() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
mkdir -p ${work_dir}/iso/isolinux
- sed "s|%INSTALL_DIR%|${install_dir}|g" isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg
+ sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg
cp ${work_dir}/root-image/usr/lib/syslinux/isolinux.bin ${work_dir}/iso/isolinux/
: > ${work_dir}/build.${FUNCNAME}
fi
@@ -64,7 +66,7 @@ make_isolinux() {
# Process aitab
make_aitab() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
- sed "s|%ARCH%|${arch}|g" aitab > ${work_dir}/iso/${install_dir}/aitab
+ sed "s|%ARCH%|${arch}|g" ${script_path}/aitab > ${work_dir}/iso/${install_dir}/aitab
: > ${work_dir}/build.${FUNCNAME}
fi
}