mk 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. sudo echo "\n--- running pacman ---\n"
  3. BASE_PKGS="$(pacman -Qg base-devel | cut -d ' ' -f 2)"
  4. CALAMARES_PKGS="boost extra-cmake-modules git kpmcore qt5-tools polkit-qt5 yaml-cpp" # squashfs-tools os-prober
  5. PARABOLA_PKGS="arch-install-scripts"
  6. PKGS="$BASE_PKGS $CALAMARES_PKGS $PARABOLA_PKGS"
  7. pacman -Qi calamares > /dev/null 2>&1 && sudo pacman -R calamares
  8. pacman -Qi $PKGS > /dev/null || sudo pacman -S --needed $PKGS
  9. echo "\n--- preparing build environment ---\n"
  10. if [ ! -d build ]
  11. then mkdir build
  12. # else rm -f build/Makefile 2> /dev/null
  13. fi
  14. # if [ ! -d /etc/calamares/ ]
  15. # then sudo mkdir /etc/calamares
  16. # sudo ln -s `pwd`/settings.conf /etc/calamares/
  17. # sudo ln -s `pwd`/src/branding /etc/calamares/
  18. # fi
  19. echo "\n--- running cmake ---\n"
  20. cd build
  21. cmake -DCMAKE_BUILD_TYPE=Debug \
  22. -DCMAKE_INSTALL_PREFIX=/usr \
  23. -DCMAKE_INSTALL_LIBDIR=lib \
  24. -DWITH_CRASHREPORTER=OFF \
  25. -DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython \
  26. dummypythonqt grubcfg initramfs initramfscfg \
  27. interactiveterminal license plymouthcfg removeuser webview" ..
  28. echo "\n--- running make uninstall ---\n"
  29. [ -d /usr/share/calamares/ ] && sudo make uninstall
  30. sudo rm -rf /usr/share/calamares/
  31. echo "\n--- running make install ---\n"
  32. [ -f Makefile ] && sudo make install
  33. cd ..
  34. echo "\n--- launching calamares ---\n"
  35. # [ "`lsmod | grep squashfs`" ] || sudo modprobe squashfs
  36. [ -f /usr/bin/calamares ] && sudo calamares
  37. # [ -f build/calamares ] && sudo build/calamares