diff options
author | Daniel Baumann <daniel@debian.org> | 2013-01-06 23:30:49 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2013-01-06 23:30:49 +0100 |
commit | 7f0662cd50d71f58d4ab4a124897c2dd6f6946c1 (patch) | |
tree | 87416ceb594a54d9841b264ae265dc7ef7aa920c /scripts | |
parent | 24463f688f3379ec69b83f49301ea221be5501dc (diff) | |
download | vyos-live-build-7f0662cd50d71f58d4ab4a124897c2dd6f6946c1.tar.gz vyos-live-build-7f0662cd50d71f58d4ab4a124897c2dd6f6946c1.zip |
Cleaning up binary_loadlin.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/binary_loadlin | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/scripts/build/binary_loadlin b/scripts/build/binary_loadlin index 9a8e6a445..1bbe1b24d 100755 --- a/scripts/build/binary_loadlin +++ b/scripts/build/binary_loadlin @@ -45,33 +45,39 @@ Create_lockfile .lock case "${LB_ARCHITECTURES}" in amd64|i386) - if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] - then - # Checking depends - Check_package chroot/usr/lib/loadlin/loadlin.exe.gz loadlin - - # Restoring cache - Restore_cache cache/packages.binary - - # Installing depends - Install_package - - # Copying loadlin - mkdir -p binary/tools - gunzip -c chroot/usr/lib/loadlin/loadlin.exe.gz > binary/tools/loadlin.exe - gunzip -c chroot/usr/share/doc/loadlin/manual.txt.gz > binary/tools/loadlin.txt - - # Saving cache - Save_cache cache/packages.binary - - # Removing depends - Remove_package - else - # Copying loadlin - mkdir -p binary/tools - gunzip -c /usr/lib/loadlin/loadlin.exe.gz > binary/tools/loadlin.exe - gunzip -c /usr/share/doc/loadlin/manual.txt.gz > binary/tools/loadlin.txt - fi + case "${LB_BUILD_WITH_CHROOT}" in + true) + # Checking depends + Check_package chroot/usr/lib/loadlin/loadlin.exe.gz loadlin + + # Restoring cache + Restore_cache cache/packages.binary + + # Installing depends + Install_package + + _PREFIX="chroot" + ;; + + false) + _PREFIX="" + ;; + esac + + # Copying loadlin + mkdir -p binary/tools + gunzip -c "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" > binary/tools/loadlin.exe + gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt + + case "${LB_BUILD_WITH_CHROOT}" in + true) + # Saving cache + Save_cache cache/packages.binary + + # Removing depends + Remove_package + ;; + esac cat > binary/install/install.bat << EOF \tools\loadlin.exe vmlinuz initrd=initrd.gz @@ -85,12 +91,12 @@ cat > binary/install/gtk/install.bat << EOF EOF fi + + # Creating stage file + Create_stagefile .build/binary_loadlin ;; *) Echo_warning "loadlin inclusion is set to true but not compatible with your architecture, ignoring." ;; esac - -# Creating stage file -Create_stagefile .build/binary_loadlin |