install_slige.sh 799 B

123456789101112131415161718192021222324252627
  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. # bsp
  11. if [ ! -f ~/src/bsp/bsp-5.2.tar.bz2 ]; then
  12. mkdir -p ~/src/bsp && cd ~/src/bsp && curl -O http://games.moria.org.uk/doom/bsp/download/bsp-5.2.tar.bz2 && tar -xjvf bsp-5.2.tar.bz2 && cd bsp-5.2
  13. ./configure && make
  14. fi
  15. # slige
  16. if [ ! -f ~/src/xwadtools/xwadtools-20010615.tar.gz ]; then
  17. $su dpkg --add-architecture i386
  18. $su apt-get install -y libc6-dev-i386
  19. mkdir -p ~/src/xwadtools && cd ~/src/xwadtools/ && curl -O ftp://ftp.fu-berlin.de/pc/games/idgames/source/xwadtools-20010615.tar.gz && tar -xzvf xwadtools-20010615.tar.gz
  20. cp -r ~/src/xwadtools/xwadtools/slige ~/src/ && cd ~/src/slige
  21. cc -m32 slige.c -o slige
  22. fi