1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

move chunks of shell from Makefile into scripts

This commit is contained in:
Ivan Mikushin
2015-08-06 01:58:32 +05:00
parent 9436b0da9a
commit e0e51a9f37
5 changed files with 58 additions and 21 deletions

12
scripts/mk-images-tar.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
ln -sf bin/rancheros ./ros
for i in `./ros c images -i os-config.yml`; do
[ "${FORCE_PULL}" != "1" ] && docker inspect $i >/dev/null 2>&1 || docker pull $i;
done
docker save `./ros c images -i os-config.yml` > ${INITRD_DIR}/images.tar

11
scripts/mk-initrd.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
. scripts/build-common
mv ${BUILD}/kernel/lib ${INITRD_DIR}
mv assets/docker ${INITRD_DIR}
cp os-config.yml ${INITRD_DIR}
cp bin/rancheros ${INITRD_DIR}/init
cd ${INITRD_DIR} && find | cpio -H newc -o | lzma -c > ${DIST}/artifacts/initrd

12
scripts/mk-iso-checksums-txt.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
. scripts/build-common
cd ${DIST}/artifacts
rm -f iso-checksums.txt || :
for algo in 'sha256' 'md5'; do
echo "$algo: `${algo}sum rancheros.iso`" >> iso-checksums.txt;
done

19
scripts/mk-rancheros-iso.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
. scripts/build-common
cp ${DIST}/artifacts/initrd ${CD}/boot
cp ${DIST}/artifacts/vmlinuz ${CD}/boot
cp scripts/isolinux.cfg ${CD}/boot/isolinux
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux
cd ${CD} && xorriso \
-publisher "Rancher Labs, Inc." \
-as mkisofs \
-l -J -R -V "RancherOS" \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-o ${DIST}/artifacts/rancheros.iso ${CD}