Advertisement
aaditya

configure-thus.sh

Jun 5th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. #!/bin/bash
  2. # configure_thus.sh
  3.  
  4. set -e
  5.  
  6. # variables
  7. kernel=linux318
  8. dist_name=Manjaro
  9. dist_release=0.8.13
  10. iso_name=manjaro
  11. if [ "$(uname -m)" = x86_64 ]; then
  12. arch=x86_64
  13. else
  14. arch=i686
  15. fi
  16. custom=xfce
  17. username=manjaro
  18.  
  19. # configure_thus
  20. source "/etc/mkinitcpio.d/${kernel}.preset"
  21. conf="/etc/thus.conf"
  22. echo "[distribution]" > "$conf"
  23. echo "DISTRIBUTION_NAME = \"${dist_name} Linux\"" >> "$conf"
  24. echo "DISTRIBUTION_VERSION = \"${dist_release}\"" >> "$conf"
  25. echo "SHORT_NAME = \"${dist_name}\"" >> "$conf"
  26. echo "[install]" >> "$conf"
  27. echo "LIVE_MEDIA_SOURCE = \"/bootmnt/${iso_name}/${arch}/root-image.sqfs\"" >> "$conf"
  28. echo "LIVE_MEDIA_DESKTOP = \"/bootmnt/${iso_name}/${arch}/${custom}-image.sqfs\"" >> "$conf"
  29. echo "LIVE_MEDIA_TYPE = \"squashfs\"" >> "$conf"
  30. echo "LIVE_USER_NAME = \"${username}\"" >> "$conf"
  31. echo "KERNEL = \"${kernel}\"" >> "$conf"
  32. echo "VMLINUZ = \"$(echo ${ALL_kver} | sed s'|/boot/||')\"" >> "$conf"
  33. echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf"
  34. echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf"
  35.  
  36. # Done
  37. echo "Thus configured"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement