Skip to content

Commit

Permalink
install_plugin.sh: Ask user if VIMPLUGINS isn't set and no directory …
Browse files Browse the repository at this point in the history
…argument is given
  • Loading branch information
tomtom committed Sep 26, 2010
1 parent dd0c843 commit 06a2375
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion install_plugin.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# install.sh -- created 2010-09-15, Tom Link
# @Last Change: 2010-09-26.
# @Revision: 0.123
# @Revision: 0.140

if [ -e $HOME/vimfiles ]; then
VIMFILES=$HOME/vimfiles
Expand Down Expand Up @@ -101,6 +101,14 @@ fi


if [ -z $1 ]; then
if [ -z $VIMPLUGINS ]; then
echo "No directory is given and \$VIMPLUGINS is not set."
read -p "Copy files from '$PWD' to '$VIMFILES'? (y/N) " yesno
if [ "$yesno" != 'y' ]; then
echo "Cancel!"
exit 5
fi
fi
if [ -n $VIMPLUGINS ]; then
DIRS=`find $VIMPLUGINS -maxdepth 1 -type d -not -name ".*" -not -name "_*"`
else
Expand Down

0 comments on commit 06a2375

Please sign in to comment.