install.sh 922 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. VERSION='1.3.2'
  3. echo 'Press ENTER to continue or any other key to abort'
  4. read -s -n 1 key
  5. if [[ "$key" = "" ]]
  6. then
  7. if [ -e Lychee-$VERSION ]
  8. then
  9. echo "The folder 'Lychee-$VERSION' already exists. Please delete it before you try to install Lychee."
  10. exit 1
  11. fi
  12. if [ -e lychee ]
  13. then
  14. echo "The folder 'lychee' already exists. Please delete it before you try to install Lychee."
  15. exit 1
  16. fi
  17. echo 'Downloading and installing Lychee...' && \
  18. curl -sS https://codeload.github.com/electerious/Lychee/zip/v$VERSION > lychee.zip && \
  19. echo 'Downloaded.' && \
  20. echo 'Unzipping...' && \
  21. unzip lychee.zip && \
  22. rm lychee.zip && \
  23. mv Lychee-$VERSION lychee && \
  24. cd lychee && \
  25. echo 'The required directories will be made writable and executable for others. Please enter your password if prompted to do so.' && \
  26. sudo chmod -R 777 uploads php && \
  27. echo 'Installation successful!' && \
  28. exit 0
  29. fi