install_frogcomposband.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. $su pacman -Sy --noconfirm --needed autoconf gcc libx11
  11. #gpg --keyserver keys.gnupg.net --recv-keys 702353E0F7E48EDB
  12. #paru ncurses5-compat-libs
  13. #paru libstdc++296 # Edit PKGBUILD manually (https://aur.archlinux.org/packages/libstdc%2B%2B296/)
  14. application=frogcomposband
  15. repository=https://github.com/sulkasormi/frogcomposband.git
  16. export compile=
  17. mkdir -p ~/src
  18. cd ~/src || return
  19. if [ ! -d $application ]; then
  20. git clone $repository
  21. cd $application || return
  22. export compile=true
  23. else
  24. cd $application || return
  25. #git pull
  26. pwd
  27. git fetch
  28. LOCAL=$(git rev-parse HEAD)
  29. REMOTE=$(git rev-parse @{u})
  30. if [ ! $LOCAL = $REMOTE ]; then
  31. pwd
  32. echo "Need to pull"
  33. git pull
  34. export compile=true
  35. fi
  36. fi
  37. if [ "$compile" = "true" ]; then
  38. cd ~/src/$application || return
  39. sh autogen.sh
  40. chmod +x configure
  41. ./configure --prefix "$HOME"/.frogcomposband --with-no-install
  42. make clean
  43. make
  44. fi