Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ "$UID" != "0" ];then echo 'I need to be root. aborting.';exit 1;fi
- if [ -e iso ];then echo 'An "iso" folder exists here. aborting.';exit 1;fi
- if [ ! -e ctkarchlive-0.7-x64.iso ];then echo 'I need the ctkarchlive-0.7-x64.iso file here. It is not present. aborting.';exit 1;fi
- if [ -e ctkarchlive-0.7-x64-CUSTOM.iso ];then echo 'ctkarchlive-0.7-x64-CUSTOM.iso already exists. aborting.';exit 1;fi
- if [ "$(md5sum ctkarchlive-0.7-x64.iso)" != "3969bb85f064e730a9c83b0933848f1a ctkarchlive-0.7-x64.iso" ];then
- echo 'ctkarchlive-0.7-x64.iso is not the original file: bad md5sum. aborting.';exit 1
- fi
- if [ ! -x /usr/bin/mkisofs ];then echo 'Package cdrkit missing. aborting.';exit 1;fi
- if [ ! -x /usr/bin/isohybrid ];then echo 'Package syslinux missing. aborting.';exit 1;fi
- if ! ls addon*-*.sqfs &>/dev/null;then echo 'No add-on(s) in this folder. aborting.';exit 1;fi
- if [ -e ctkarchlive-0.7-x64-iso ];then echo 'folder "ctkarchlive-0.7-x64-iso" already exists. aborting.';exit 1;fi
- if [ -e iso ];then echo 'folder "iso" already exists. aborting.';exit 1;fi
- mkdir ctkarchlive-0.7-x64-iso iso || exit 1
- mount -o loop ctkarchlive-0.7-x64.iso ctkarchlive-0.7-x64-iso/ || exit 1
- cp -r ctkarchlive-0.7-x64-iso/* iso/ || exit 1
- umount ctkarchlive-0.7-x64-iso/ || exit 1
- rmdir ctkarchlive-0.7-x64-iso || exit 1
- cp addon*-*.sqfs iso/addons/ || exit 1
- mkisofs -r -l \
- -b boot/syslinux/isolinux.bin -c boot/syslinux/boot.cat \
- -uid 0 -gid 0 \
- -udf -allow-limited-size -iso-level 3 \
- -input-charset utf-8 -p "mkarchiso" \
- -no-emul-boot -boot-load-size 4 -boot-info-table \
- -publisher "$(whoami)" \
- -A "CTKArch Live custom" \
- -V "CTKArch7" \
- -o "ctkarchlive-0.7-x64-CUSTOM.iso" "iso/" || exit 1
- isohybrid "ctkarchlive-0.7-x64-CUSTOM.iso" || exit 1
- rm -r iso || exit 1
- echo 'Hopefully everything seemed to work. ctkarchlive-0.7-x64-CUSTOM.iso generated with your addons inside.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement