daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Apr 11th, 2011 221 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. if [ "$UID" != "0" ];then echo 'I need to be root. aborting.';exit 1;fi
  3. if [ -e iso ];then echo 'An "iso" folder exists here. aborting.';exit 1;fi
  4. 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
  5. if [ -e ctkarchlive-0.7-x64-CUSTOM.iso ];then echo 'ctkarchlive-0.7-x64-CUSTOM.iso already exists. aborting.';exit 1;fi
  6. if [ "$(md5sum ctkarchlive-0.7-x64.iso)" != "3969bb85f064e730a9c83b0933848f1a  ctkarchlive-0.7-x64.iso" ];then
  7.  echo 'ctkarchlive-0.7-x64.iso is not the original file: bad md5sum. aborting.';exit 1
  8. fi
  9. if [ ! -x /usr/bin/mkisofs ];then echo 'Package cdrkit missing. aborting.';exit 1;fi
  10. if [ ! -x /usr/bin/isohybrid ];then echo 'Package syslinux missing. aborting.';exit 1;fi
  11. if ! ls addon*-*.sqfs &>/dev/null;then echo 'No add-on(s) in this folder. aborting.';exit 1;fi
  12. if [ -e ctkarchlive-0.7-x64-iso ];then echo 'folder "ctkarchlive-0.7-x64-iso" already exists. aborting.';exit 1;fi
  13. if [ -e iso ];then echo 'folder "iso" already exists. aborting.';exit 1;fi
  14. mkdir ctkarchlive-0.7-x64-iso iso || exit 1
  15. mount -o loop ctkarchlive-0.7-x64.iso ctkarchlive-0.7-x64-iso/ || exit 1
  16. cp -r ctkarchlive-0.7-x64-iso/* iso/ || exit 1
  17. umount ctkarchlive-0.7-x64-iso/ || exit 1
  18. rmdir ctkarchlive-0.7-x64-iso || exit 1
  19. cp addon*-*.sqfs iso/addons/ || exit 1
  20. mkisofs -r -l \
  21.         -b boot/syslinux/isolinux.bin -c boot/syslinux/boot.cat \
  22.         -uid 0 -gid 0 \
  23.         -udf -allow-limited-size -iso-level 3 \
  24.         -input-charset utf-8 -p "mkarchiso" \
  25.         -no-emul-boot -boot-load-size 4 -boot-info-table \
  26.         -publisher "$(whoami)" \
  27.         -A "CTKArch Live custom" \
  28.         -V "CTKArch7" \
  29.         -o "ctkarchlive-0.7-x64-CUSTOM.iso" "iso/" || exit 1
  30. isohybrid "ctkarchlive-0.7-x64-CUSTOM.iso" || exit 1
  31. rm -r iso || exit 1
  32. echo 'Hopefully everything seemed to work. ctkarchlive-0.7-x64-CUSTOM.iso generated with your addons inside.'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top