installer.sh 918 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. # Standalone installer for Unixs
  3. # Original version is created by shoma2da
  4. # https://github.com/shoma2da/neobundle_installer
  5. if [ $# -ne 1 ]; then
  6. echo "You must specify the installation directory!"
  7. exit 1
  8. fi
  9. # Convert the installation directory to absolute path
  10. case $1 in
  11. /*) PLUGIN_DIR=$1;;
  12. *) PLUGIN_DIR=$PWD/$1;;
  13. esac
  14. INSTALL_DIR="${PLUGIN_DIR}/repos/github.com/Shougo/dein.vim"
  15. echo "Install to \"$INSTALL_DIR\"..."
  16. if [ -e "$INSTALL_DIR" ]; then
  17. echo "\"$INSTALL_DIR\" already exists!"
  18. fi
  19. echo ""
  20. # check git command
  21. type git || {
  22. echo 'Please install git or update your path to include the git executable!'
  23. exit 1
  24. }
  25. echo ""
  26. # make plugin dir and fetch dein
  27. if ! [ -e "$INSTALL_DIR" ]; then
  28. echo "Begin fetching dein..."
  29. mkdir -p "$PLUGIN_DIR"
  30. git clone https://github.com/Shougo/dein.vim "$INSTALL_DIR"
  31. echo "Done."
  32. echo ""
  33. fi
  34. echo "Done."
  35. echo "Complete setup dein!"